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

A trigger can reference objects outside the current database? State true or false.

1061


what is a correlated sub-query? : Sql server database administration

992


What are the benefits and tasks of object explorer? : sql server management studio

1258


Will count(column) include columns with null values in its count?

1149


What is the standby server?

1001


What is primary key, unique key, and foreign key?

1018


How can you tell if a database object is invalid?

1118


What is normalization? Describe its different types.

1157


What is database isolation in sql server? : sql server database administration

1159


Are there issues when exporting SSRS reports into Microsoft Excel? When my users are trying to export a SSRS report into Microsoft Excel, one or two columns in the report appear to merge together. Why might this be?

195


What are a scheduled jobs?

996


Write a program using SQL queries to find a unique entry in a table.

1049


Do you know how to implement service broker?

973


What is history table in sql server?

1037


How do you set a trace flag in sql server?

1097