JuanBob
SSCertifiable
Points: 5059
More actions
April 29, 2008 at 4:15 pm
#76967
I need to include error handling for an INSERT, but I also need to return the records affected.
Unfortunately, I cannot use BEGIN TRANSACTION. After an INSERT command, how I could I get both @@ERROR as well as @@ROWCOUNT?
Thanks!
Sergiy
SSC Guru
Points: 110208
April 29, 2008 at 4:23 pm
#808702
SELECT @ErrNo = @@ERROR, @RowCnt = @@ROWCOUNT
_____________Code for TallyGenerator
April 29, 2008 at 4:32 pm
#808703
Perfect, thanks!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply