error handling

  • in a stored procedure i am executing another procedure ,now i have to trap the error which is generated by called procedure,plz give proper soution for this inner procedure error handling

  • We RETURN the error code from each procedure. You might trap the errors in something like this

    EXEC @errorcode = OtherStoredProc ...

    SET @procErr = @@ERROR

    IF @procErr <> 0 GOTO InProcError

    IF @errorcode <> 0 GOTO CalledProcError

    Guarddata-

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply