I have a stored procedure whic does some deleting. I use @@error to check error after delete. But somehow even there is error (I put a wrong table name)it never seem to get to the if @@error <> 0 part. So the roolback is not called. I got the following message:

Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1.

Does anyone know why it didn&#39;t get into the if @@error <> 0 part?

Ronnie