IT Community - Software Programming, Web Development and Technical Support

How to get @@error and @@rowcount at the same time?

This is a discussion on How to get @@error and @@rowcount at the same time? within the Database Support forums, part of the Web Development category; How to get @@error and @@rowcount at the same time?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-27-2008, 01:56 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Question How to get @@error and @@rowcount at the same time?

How to get @@error and @@rowcount at the same time?
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-28-2008, 03:34 AM
mobilegeek mobilegeek is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 205
mobilegeek is on a distinguished road
Smile Re: How to get @@error and @@rowcount at the same time?

Hi,

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.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-02-2008, 03:47 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Cool Re: How to get @@error and @@rowcount at the same time?

Hi,

look at here...

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
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
show clocks, one showing the current time, and another showing a time 12 hours behind itbarota HTML, CSS and Javascript Coding Techniques 1 02-13-2008 09:15 PM
How can I set the time zone for MySQL to UK time? itbarota PHP Programming 1 09-12-2007 12:13 AM
Handling of run time error in java? prasath Java Programming 1 07-20-2007 06:30 AM
How to get @@error and @@rowcount at the same time? Archer Database Support 3 07-18-2007 11:31 PM
Diff between Transaction-time and Server response-time vadivelanvaidyanathan Software Testing 0 03-21-2007 06:29 AM


All times are GMT -7. The time now is 11:23 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0