@@ERRORand@@ROWCOUNT

  • 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!

  • SELECT @ErrNo = @@ERROR, @RowCnt = @@ROWCOUNT

    _____________
    Code for TallyGenerator

  • Perfect, thanks!

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

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