July 30, 2007 at 3:45 pm
I keep getting an error since I am setting two steps waiting (one the active task i'm on and the other the one i have to back to in the loop).
How do I loop back to task 3 and keep the task i'm on waiting?
Thanks
mathjon
*******************CODE*******************
Function Main()
Dim oRS
Set oRS = DTSGlobalVariables("rs_US").Value
' Check if there are still more records in the Recordset
If oRS.EOF Then
' No more records, so continue workflow
Set DTSGlobalVariables("rs_US").Value = Nothing
Main = DTSTaskExecResult_Success
Else
' More records to process, so loop back and do not execute this task
DTSGlobalVariables.Parent. _
Steps("DTSStep_DTSExecuteSQLTask_3"). _
ExecutionStatus = DTSStepExecStat_Waiting
Main = DTSStepExecStat_Waiting
End If
Set oRS = Nothing
End Function
July 31, 2007 at 6:32 am
Have a look at this: http://www.sqldts.com/246.aspx
It might be as simple as setting the execution status of the current step to success:
Main = DTSTaskExecResult_Success
You have yours set to waiting.
J
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply