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 |
Gunnar_Eriksson
Starting Member
1 Post |
Posted - 2004-10-06 : 06:40:45
|
Q. what's the best way to program a DTS- package to wait for a file tobe completed. In the manual i found this but somthing seams to be missing.'***************************************************************' Visual Basic ActiveX Script'***************************************************************Function Main() Dim fso Set fso = CreateObject("Scripting.FileSystemObject") IF NOT(fso.FileExists("C:\MyFile.txt")) THEN DTSGlobalVariables("retries").Value =DTSGlobalVariables("retries").Value +1 MsgBox "Retry #" & DTSGlobalVariables("retries").Value IF DTSGlobalVariables("retries").Value > 25 THEN Main = DTSStepScriptResult_DontExecuteTask ELSE MsgBox "Retry #" & DTSGlobalVariables("retries").Value Main = DTSStepScriptResult_RetryLater END IF ELSE Main = DTSStepScriptResult_ExecuteTask END IFEnd FunctionGER |
|
|
|
|