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 / pankaj

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 ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is 2nf normalization?

1013


What is policy based management (pbm)? : sql server database administration

970


Do you know how to implement service broker?

926


Can you tell me about the concept of ER diagrams?

1059


What are 3 ways to get a count of the number of records in a table?

1067


What is standby servers? Explain types of standby servers.

987


Explain try...catch with sql server?

1017


Explain different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?

1029


What are parameterized reports?

200


What should be the fill factor for indexes created on tables? : sql server database administration

1129


What is use of attribute hierarchy ordered ? : sql server analysis services, ssas

1004


What are ddl (data definition language) statements for tables in ms sql server?

1092


What is self join in sql server joins?

1047


What is update_statistics command?

1057


What stored by the msdb? : sql server database administration

996