Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

How to get @@error and @@rowcount at the same time?

Jun 2 2011 4:30AM by Dinesh Sodani   

If @@Rowcount is checked after Error checking statement then it will have 0 as the value of @@Recordcount as it would have been reset.

And if @@Recordcount is checked before the error-checking statement then @@Error would get reset.

To get @@error and @@rowcount at the same time do both in same statement and store them in local variable. SELECT @RC = @@ROWCOUNT, @ER = @@ERROR

Read More..   [0 clicks]

Published under: SQL Server Tips ·  ·  ·  · 


Dinesh Sodani
30 · 6% · 1807
9
 
5
 
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

1  Comments  

  • It's funny how we generally overlook such simple solutions. Thank-you for sharing this, Dinesh!

    commented on Jun 8 2011 5:43AM
    Nakul Vachhrajani
    4 · 33% · 10587

Your Comment


Sign Up or Login to post a comment.

"How to get @@error and @@rowcount at the same time?" rated 5 out of 5 by 9 readers
How to get @@error and @@rowcount at the same time? , 5.0 out of 5 based on 9 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]