>
Similarly, "SELECT @@ERROR" would return the error code of the last command (zero, if it was successful).
>
The only way to trap @@error is to encapsulate the call into a stored procedure. Rendering a sql insert and/or delete from the client will not provide an opportunity to trap and deal with the error.
Also, subsequent calls to get @@rowcount are not reliable and ineffecient since you are 1 - not in the original tx and 2 - you have to make another trip to the server when 1 should suffice.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only