December 4, 2002 at 2:50 pm
I'm creating a DTS that prompts the user for input using an InputBox in an ActiveX Script. How can I stop execution of the DTS package if the user clicks on the Cancel button of the InputBox.
I currently have...
myUserResponse = InputBox ("My Prompt for the User")
If myUserResponse = vbCancel Then
--> Need to stop execution of DTS here <--
End If
What do I need to insert above to accomplish this task?
Thanks!!!
December 4, 2002 at 2:53 pm
Forgot to add that I'm using SQL Server 7 if that makes a difference --
probably not in the case of VBScript.
December 4, 2002 at 3:56 pm
If myUserResponse = "" Then
Main = DTSTaskExecResult_Failure
exit function
End If
This gets both the case where the user enters nothing and the case where they hit cancel. If you want to fail the package due to this condition, right-click the ActiveX task, chose workflow, workflow properties, options, then fail package on step failure.
Lori
December 4, 2002 at 4:33 pm
I think all you need is the
Main = DTSTaskExecResult_Failure
exit function
where you have need to stop here at.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply