April 30, 2003 at 4:18 am
April 30, 2003 at 6:39 am
Yes. I would imagine so.
Just a reminder, when using @@ERROR, note that it gives the error of most recent sql statement. Hence it is better to store this @@ERROR in a variable and use the variable to check for conditions, return as output parameter etc.,
April 30, 2003 at 6:46 am
Is there an "On Error Resume Next" command? I am creating these procedures that bomb out when they encounter an error and I need to do some clean up if they do encounter an error.
April 30, 2003 at 10:21 am
No but you can use goto to branch, eg
declare @ErrorNo int
(sql statement)
SET @ErrorNo = @@ERROR
IF @ErrorNo <> 0 GOTO Error_handler
(sql statement)
SET @ErrorNo = @@ERROR
IF @ErrorNo <> 0 GOTO Error_handler
RETURN
Error_handler:
(clean up)
Far away is close at hand in the images of elsewhere.
Anon.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply