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.
| 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 fsodim fSet 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 Ifend ifset fso = nothing set f = nothing End FunctionEverything 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 # 2147220482Microsoft VBScript runtime error.ActiveX Component can't create object "CreateObject"Line 6Please 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 |
 |
|
|
|
|
|