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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS - Stored Procedures

Status
Not open for further replies.

vechalapu

Programmer
May 2, 2001
58
US
Hi,

I am executing SQL task for executing Stored Procedures. Whenever Stored Procedures abends due to fatal error i.e. invalid column name is not being recongised by DTS as an error instead it says it is successful. Is there any way to trap fatal errors from Stored Procedures when executed through DTS.

Thanking You,
Babu Vechalapu
 
No, not really. All dts cares about is that it was able to run the sp. It doesn't care if it failed or not.

What you can do is trap the error (with &quot;if @@Error <> 0 goto someline&quot; after EVERY statement) and then return the error code. Because, you can check this in DTS (atleast in sql 2k) by saving the output to a global

Then you can put a vbscript step to check the return value and do whatever.

HTH


______________________________
- David Lanouette
- Lanouette Consulting, LLC
- DLanouette@Computer.org

 
Hi,

From my experience using SQL task, it is not possible to trap fatal errors. I could trap all errors in stored procedures by executing stored procedurtes using SQL Server osql utility.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top