dbTalk Databases Forums  

SQL job cannot run ActiveX Task

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SQL job cannot run ActiveX Task in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike Torry
 
Posts: n/a

Default SQL job cannot run ActiveX Task - 03-09-2006 , 04:49 PM






I have DTS containing ActiveX task. DTS runs fine on SQL server 2000.
But when I schedule it as SQL job, the SQL job is failed.
My other SQL jobs which do not contain ActiveX run okay.

Why SQL job can not run DTS with ActiveX?

Thanks for suggestions.


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: SQL job cannot run ActiveX Task - 03-09-2006 , 04:53 PM






Hello Mike,

And what does this task do?

Have a look here

http://support.microsoft.com/?kbid=269074

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
I have DTS containing ActiveX task. DTS runs fine on SQL server 2000.
But when I schedule it as SQL job, the SQL job is failed.
My other SQL jobs which do not contain ActiveX run okay.
Why SQL job can not run DTS with ActiveX?

Thanks for suggestions.




Reply With Quote
  #3  
Old   
Mike Torry
 
Posts: n/a

Default Re: SQL job cannot run ActiveX Task - 03-09-2006 , 05:08 PM



This ActiveX only checks if new files are found. Manually run DTS is fine.
But SQL job always gets failed. I listed ActiveX code here:
-----------------------------------------------------------------
Function Main()
Dim objFSO, strFullNm, objFolder, objFile, colFiles
Set objFSO = CreateObject("Scripting.FileSystemObject")

strFullNm1 = DTSGlobalVariables("gvFilePathRoot").Value & "bgcmsdata_sbt"
strFullNm2 = DTSGlobalVariables("gvFilePathRoot").Value & "wlica.txt"
strFullNm3 = DTSGlobalVariables("gvFilePathRoot").Value & "wlick.txt"

Set objFolder =
objFSO.GetFolder(DTSGlobalVariables("gvFilePathRoo t").Value)
Set colFiles = objFolder.Files

If objFSO.FileExists(strFullNm1) Then
DTSGlobalVariables("gvFileName").value = "bgcmsdata_sbt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success

ElseIf objFSO.FileExists(strFullNm2) Then
DTSGlobalVariables("gvFileName").value = "wlica.txt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success

ElseIf objFSO.FileExists(strFullNm3) Then
DTSGlobalVariables("gvFileName").value = "wlick.txt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
Else
Set objFSO = nothing
Main = DTSTaskExecResult_Failure
End If
End Function
-------------------------------------------------------------

"Allan Mitchell" wrote:

Quote:
Hello Mike,

And what does this task do?

Have a look here

http://support.microsoft.com/?kbid=269074

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

I have DTS containing ActiveX task. DTS runs fine on SQL server 2000.
But when I schedule it as SQL job, the SQL job is failed.
My other SQL jobs which do not contain ActiveX run okay.
Why SQL job can not run DTS with ActiveX?

Thanks for suggestions.





Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: SQL job cannot run ActiveX Task - 03-09-2006 , 05:21 PM



Do you get any errors?

--
Darren
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com

"Mike Torry" <MikeTorry (AT) discussions (DOT) microsoft.com> wrote

Quote:
This ActiveX only checks if new files are found. Manually run DTS is fine.
But SQL job always gets failed. I listed ActiveX code here:
-----------------------------------------------------------------
Function Main()
Dim objFSO, strFullNm, objFolder, objFile, colFiles
Set objFSO = CreateObject("Scripting.FileSystemObject")

strFullNm1 = DTSGlobalVariables("gvFilePathRoot").Value & "bgcmsdata_sbt"
strFullNm2 = DTSGlobalVariables("gvFilePathRoot").Value & "wlica.txt"
strFullNm3 = DTSGlobalVariables("gvFilePathRoot").Value & "wlick.txt"

Set objFolder =
objFSO.GetFolder(DTSGlobalVariables("gvFilePathRoo t").Value)
Set colFiles = objFolder.Files

If objFSO.FileExists(strFullNm1) Then
DTSGlobalVariables("gvFileName").value = "bgcmsdata_sbt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success

ElseIf objFSO.FileExists(strFullNm2) Then
DTSGlobalVariables("gvFileName").value = "wlica.txt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success

ElseIf objFSO.FileExists(strFullNm3) Then
DTSGlobalVariables("gvFileName").value = "wlick.txt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
Else
Set objFSO = nothing
Main = DTSTaskExecResult_Failure
End If
End Function
-------------------------------------------------------------

"Allan Mitchell" wrote:

Hello Mike,

And what does this task do?

Have a look here

http://support.microsoft.com/?kbid=269074

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

I have DTS containing ActiveX task. DTS runs fine on SQL server 2000.
But when I schedule it as SQL job, the SQL job is failed.
My other SQL jobs which do not contain ActiveX run okay.
Why SQL job can not run DTS with ActiveX?

Thanks for suggestions.







Reply With Quote
  #5  
Old   
Mike Torry
 
Posts: n/a

Default Re: SQL job cannot run ActiveX Task - 03-10-2006 , 08:37 AM



Yes. Here is error message:
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 4500
Error Detail Records:
Error: -2147220482 (800403FE);
Provider Error: 0 (0)
Error string: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: Path not found
--------------------------------------------------

"Darren Green" wrote:

Quote:
Do you get any errors?

--
Darren
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com

"Mike Torry" <MikeTorry (AT) discussions (DOT) microsoft.com> wrote in message
news:4165087F-D4A9-44F5-841D-22C68A5C70F8 (AT) microsoft (DOT) com...
This ActiveX only checks if new files are found. Manually run DTS is fine.
But SQL job always gets failed. I listed ActiveX code here:
-----------------------------------------------------------------
Function Main()
Dim objFSO, strFullNm, objFolder, objFile, colFiles
Set objFSO = CreateObject("Scripting.FileSystemObject")

strFullNm1 = DTSGlobalVariables("gvFilePathRoot").Value & "bgcmsdata_sbt"
strFullNm2 = DTSGlobalVariables("gvFilePathRoot").Value & "wlica.txt"
strFullNm3 = DTSGlobalVariables("gvFilePathRoot").Value & "wlick.txt"

Set objFolder =
objFSO.GetFolder(DTSGlobalVariables("gvFilePathRoo t").Value)
Set colFiles = objFolder.Files

If objFSO.FileExists(strFullNm1) Then
DTSGlobalVariables("gvFileName").value = "bgcmsdata_sbt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success

ElseIf objFSO.FileExists(strFullNm2) Then
DTSGlobalVariables("gvFileName").value = "wlica.txt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success

ElseIf objFSO.FileExists(strFullNm3) Then
DTSGlobalVariables("gvFileName").value = "wlick.txt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
Else
Set objFSO = nothing
Main = DTSTaskExecResult_Failure
End If
End Function
-------------------------------------------------------------

"Allan Mitchell" wrote:

Hello Mike,

And what does this task do?

Have a look here

http://support.microsoft.com/?kbid=269074

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

I have DTS containing ActiveX task. DTS runs fine on SQL server 2000.
But when I schedule it as SQL job, the SQL job is failed.
My other SQL jobs which do not contain ActiveX run okay.
Why SQL job can not run DTS with ActiveX?

Thanks for suggestions.








Reply With Quote
  #6  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: SQL job cannot run ActiveX Task - 03-11-2006 , 05:27 AM



Hello Mike,

Could it be that this variable "gvFilePathRoot" contains a value that cannot
be seen by running the package in a job?


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Yes. Here is error message:
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 4500
Error Detail Records:
Error: -2147220482 (800403FE);
Provider Error: 0 (0)
Error string: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: Path not found
--------------------------------------------------
"Darren Green" wrote:

Do you get any errors?

--
Darren
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com
"Mike Torry" <MikeTorry (AT) discussions (DOT) microsoft.com> wrote in message
news:4165087F-D4A9-44F5-841D-22C68A5C70F8 (AT) microsoft (DOT) com...

This ActiveX only checks if new files are found. Manually run DTS is
fine.
But SQL job always gets failed. I listed ActiveX code here:
-----------------------------------------------------------------
Function Main()
Dim objFSO, strFullNm, objFolder, objFile, colFiles
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFullNm1 = DTSGlobalVariables("gvFilePathRoot").Value &
"bgcmsdata_sbt" strFullNm2 =
DTSGlobalVariables("gvFilePathRoot").Value & "wlica.txt" strFullNm3
= DTSGlobalVariables("gvFilePathRoot").Value & "wlick.txt"

Set objFolder =
objFSO.GetFolder(DTSGlobalVariables("gvFilePathRoo t").Value) Set
colFiles = objFolder.Files

If objFSO.FileExists(strFullNm1) Then
DTSGlobalVariables("gvFileName").value = "bgcmsdata_sbt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
ElseIf objFSO.FileExists(strFullNm2) Then
DTSGlobalVariables("gvFileName").value = "wlica.txt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
ElseIf objFSO.FileExists(strFullNm3) Then
DTSGlobalVariables("gvFileName").value = "wlick.txt"
Set objFSO = nothing
Main = DTSTaskExecResult_Success
Else
Set objFSO = nothing
Main = DTSTaskExecResult_Failure
End If
End Function
-------------------------------------------------------------
"Allan Mitchell" wrote:

Hello Mike,

And what does this task do?

Have a look here

http://support.microsoft.com/?kbid=269074

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com
I have DTS containing ActiveX task. DTS runs fine on SQL server
2000.
But when I schedule it as SQL job, the SQL job is failed.
My other SQL jobs which do not contain ActiveX run okay.
Why SQL job can not run DTS with ActiveX?
Thanks for suggestions.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.