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

Would you store your query in a ssrs report or a database server? State the reason why?

148


Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?

993


what purpose does the model database serve? : Sql server database administration

921


Explain transaction server distributed transaction?

919


How optimize sql query with multiple joins in sql server?

826


What is read uncmmited?

1011


Which autogrowth database setting is good?

1002


List out some of the requirements to set up a sql server failover cluster?

979


What is database black box testing?

984


explain declarative management framework (dmf) in sql server 2008?

949


Explain the steps to create and execute a user-defined function in the sql server?

919


Do you know what is a trace frag? Where do we use it?

956


What are the recovery models for a database?

1057


What will happen if a column containing char type data is changed to the nchar data type?

1042


How is sql used in sql server?

941