Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return response code to DTS 3

Status
Not open for further replies.

theniteowl

Programmer
May 24, 2005
1,975
US
Hi All,
I have a VBS script I wish to have called from SQL DTS.
Can I return a response code to DTS to indicate success or failure?

I am not handling the DTS portion of this, I am just providing some code to automate the FTP of a file and it would be nice to tell them they can check for a return response so they know if the process completed.

Thanks.

At my age I still learn something new every day, but I forget two others.
 
I believe this is what you want:
wscript.quit(exitcode)

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
I believe this is what you want:
wscript.quit(exitcode)

That's it. I thought I had seen it in the past but my searches turned up nothing.

Should the exit codes always be numeric or can it return a text string? I am not sure how they will want to implement handling of the error code in the DTS package, numerical would probably be fine but it's nice to be able to give options if possible.

Thanks.

At my age I still learn something new every day, but I forget two others.
 
I believe it has to be numeric but cannot confirm this.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
I also have been trying to figure out how to return an error code from vbscript. This posting was exactly what I was looking for. Have another star mark.
 
The parentheses are incorrect. In this case they are merely redundant. Use:

[tt]WScript.Quit exitCode[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top