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 key constraints?

976


How dts is used to extract, transform and consolidate data?

1075


Can group functions be used in the order by clause in ms sql server?

1013


What is similarity and difference between truncate and delete in sql?

1102


What are acid properties of transaction?

949


what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration

1036


What new data source types were added in ssrs 2014?

160


How to how to convert numeric expression data types using the convert() function??

1051


What is a sql join?

1021


What is dirty page?

973


What the different components in replication and what is their use?

952


What is the difference between system objects and user objects?

1162


Does sql server 2016 have ssms?

962


can we have a nested transaction? : Sql server database administration

1096


What is the return type of executeupdate ()?

906