Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS Package with Active Script Task Problem

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-01 : 08:53:36
Sam Sokolinsky writes "I'm running a DTS package to check if the file exists on the network and determine if package should proceed further or halt if file exists.

Here is the short version of my VB ActiveX Script:

Function Main()

dim fso
dim f

Set fso = CreateObject("Scripting.FileSystemObject")

If (fso.FileExists("\\MISTest\Downloads\miserlnb.txt")) then

Set f = fso.GetFile("\\MISTest\Downloads\miserlnb.txt")

If f.DateCreated = Date AND f.size > 58000000 Then
msgbox "Success!"
Main = DTSTaskExecResult_Success
Else
msgbox "Failure!"
Main = DTSTaskExecResult_Failure
End If
end if

set fso = nothing

set f = nothing

End Function



Everything works correctly when I run this DTS Package on my client. When I try to schedule a DTS job through SQL Server Agent, my DTS fails giving me the following error:

Err # 2147220482
Microsoft VBScript runtime error.
ActiveX Component can't create object "CreateObject"
Line 6


Please help me with this problem if you can. I've been searching through MSDN, TechNet, and other sources, and I couldn't find a solution to my problem.

Thank you very much."

chadmat
The Chadinator

1974 Posts

Posted - 2002-03-01 : 10:51:15
Make sure the SCRRUN.DLL is present and registered on the server. It should be in the system32 directory. That should fix the problem.

Also make sure the account that SQLAgent is running under has permission on \\MISTest\Downloads\. If it is running as the System account it will fail again.

-Chad

Go to Top of Page
   

- Advertisement -