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!

Fatal Error Handling

Status
Not open for further replies.

hammy

Programmer
Sep 6, 2001
73
GB
Hi,

I am new to SQL stored procedures and have been having fun with Error handling ;). I have found a method that I am happy with, however it does not seem to handle Fatal Errors.

If I have 2 SP, say Tier1 and Tier2.
Tier1 calls Tier2 and within tier2 there is a typo that references a table that does not exist then Tier2 bombs and does not hit the SET @intError = @@Error code after the SELECT. Because the @@Error code is bypassed Tier1 will continue to process as if Tier2 succeeded.

How do I trap this fatal error in Tier1, or stop it bombing out in Tier2.

Thanks,

Hammy.
 
It's OK,

Just worked out what I have to do.

Thanks,

Hammy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top