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
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
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