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

Can we use having clause without group by?

979


What is the difference between resultset and resultsetmetadata?

971


What is the maximum number of index per table?

1073


Define left outer join in sql server joins?

964


what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?

5925


How can we improve performance by using SQL Server profiler?

1055


How do I repair damaged sql server mdf file database? In previous day my mdf file has got damage due to unknown reasons then I used dbcc chekcdb command but it failed, MDF file is important for me, I don’ know that how to get back mdf file data. Please anyone suggest me?

1750


Describe in brief system database.

1013


What is the difference between push and pull subscription? : sql server replication

1216


how many clustered indexes can be created on a table? : Sql server database administration

1152


What are the five characteristics of good data?

918


How to use “drop” keyword in sql server and give an example?

1131


What are logical database components? : SQL Server Architecture

1037


how do you implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql server database administration

1064


How does clustered and non clustered index work?

924