473,320 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Get diagnostics

create procedure sam() language sql
BEGIN
declare numrows integer default 0;
update sri set id=95 where id =99;
commit;
GET DIAGNOSTICS numrows = ROW_COUNT;
UPDATE sri1 SET id =numrows WHERE id =0;
commit;
END

in the above procedure the updated rows is numrows .....but i m getting 0 for numrows ..............can anyone tell the reason?????????Please help!!!!!!!!!!!
Dec 21 '08 #1
1 2539
Commit is an SQL statement too...

So you are getting 0 rows updated because commit does not update any rows. Try removing the commit (or performing the GET DIAGNOSTICS immediately after the update). This returns 2 correctly.
Jan 6 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Rhino | last post by:
I just stumbled on something odd but I'm not sure if it's a bug in DB2 or something that is "working as designed." I have a simple SQL PL stored procedure which is doing an "INSERT SELECT..."...
2
by: Eranga | last post by:
I have a windows application in C# which has the following method public void InitiateSession(string server,string userName, string passWd ) { //To start the command...
5
by: David Conorozzo | last post by:
I am able to create new sources using CreateEventSource. I can call GetEventLogs, I can delete sources, I can see if sources exist BUT, as soon as I try a "WriteEntry", I get an exception: ...
4
by: Jiho Han | last post by:
I have the following defined in web.config under <configuration> node: <system.diagnostics> <switches> <add name="MainSwitch" value="4"/> </switches>
1
by: Mukund Patel | last post by:
Hi Friends, I am working on asp.net in .net studio 2005 (Whidbey). I want to write trace in file in my web application. How to implement Diagnostics Trace features in Whidbey. I have written...
1
by: Patrick | last post by:
When Tracing in ASP.NET, the IIS process (on IIs5.1) is locking on the Trace file, and I can't read the trace file without restarting the IIS: Even the following does NOT work (how could I fix...
2
by: XxLicherxX | last post by:
Hello, I tried posting this in a different VB.net newsgroup, but never got a response. Please let me know if there is a better group to post this in. Thanks. For some reason I cannot look at...
11
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very...
0
by: Colin Williams | last post by:
I am using the code below to map network drive and then fire up an app in a sub dir of that drive. However when using the file open dialog from that app, drive K: appears just as Network drive K:...
0
by: jammendolia | last post by:
Hello all, I am having an intermittent exception occur when writing the the eventlog from a windows service application written in c#, running on a Win2k SP4 server. Here's the code: ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.