March 27, 2007 at 7:19 am
I have a DTS Package which runs fine when run from Enterprise Manager, however when run from a command prompt it runs all the way through, completing successfully but does not actually complete - ie it hangs on the line "DTSRun : Package Execution complete."
The last thing to run is a VB Script which is as follows :
Function Main()
Dim RS
Dim blnFailed
Dim objEventLog
Dim fso
set RS = CreateObject("ADODB.Recordset")
set RS = DTSGlobalVariables("CheckDateData").value
set objEventLog = CreateObject("LogEvent.LogNTEvent")
blnFailed = False
RS.movefirst
while not RS.EOF
If RS.Fields(0) = "0" Then 'Incorrect Date
blnFailed = True
End If
RS.movenext
wend
Main = DTSTaskExecResult_Success
End Function
I know it gets to the last line as I placed a msgbox there which got displayed when run from the command line. The CheckDateData global variable is an output parameter from a preceeding SQL Task.
Any ideas? Many thanks
March 27, 2007 at 10:35 am
Very strange. Does it hang when scheduled? I'm assuming that's the issue.
Are you sure there's nothing else in the package that would pop a msgbox or wait for some interactive event?
March 30, 2007 at 1:51 am
I managed to resolve the problem - you need to ensure the "Execute in Main Thread" is set to true
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply