Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can you get @@error and @@rowcount at the same time?

Answer Posted / sachin rakshe

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

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the pros and cons of putting a scalar function in a queries select list or in the where clause?

1275


What is subquery? Explain the properties of a subquery?

1042


explain different types of backups avaialabe in sql server? : Sql server database administration

1042


How to see the event list of an existing trigger using sys.trigger_events?

1141


What is difference between materialized view and view?

956


What does sql server mean?

1172


How to check parameter value in stored procedure sql server?

1037


Can we deploy SSRS reports on our personal website?

176


How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database?

1213


What are sql server functions?

1030


Explain about integration services of Microsoft SQL server?

1098


We need to perform what steps in the following order to work with a cursor?

1280


Explain the functionalities that views support?

1169


What does null mean?

1056


What are “unrepeatable reads”?

1307