DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old February 2nd, 2005, 10:08 AM
oana12 oana12 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 16 oana12 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m 27 sec
Reputation Power: 0
Exit Handler For Sqlexception

Hi,
I have this procedure
CREATE PROCEDURE t (
IN PUSERID INTEGER,
IN PDATE TIMESTAMP,
, OUT PSQLCODE INTEGER)

RESULT SETS 0 LANGUAGE SQL
BEGIN NOT ATOMIC
DECLARE SQLCODE INT;
DECLARE CONTINUE HANDLER FOR NOT FOUND
SET AT_END = 1;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
SET PSQLCODE = SQLCODE;
SET PSQLCODE = 0;
update b
set value=bvalue
where userid=puserid
and date=pdate;
commit;
end;

When I execute this procedure it is failling with SQLCODE=0.
If I execute only the update statement it is ok. Why in procedure is not executed and is finished with SQLCODE exit number?
In my table I have 2.500.000 records.

Thanks.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > Exit Handler For Sqlexception


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway