473,403 Members | 2,359 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,403 software developers and data experts.

Exit/Continue handler for any errors

Is there a way to declare exit/continue handler for what ever errors
that happen in a compound statement?The reason I am asking this is, I
am doing more than one dcl in the statement, I may get a 'table
already exists' or 'parent row not found' errors. I just want to log
them in a table instead of running the SP and piping the output to a
text log,go through the rigor of reading it. Please help..
Mar 20 '08 #1
2 2037
Arun Srinivasan wrote:
Is there a way to declare exit/continue handler for what ever errors
that happen in a compound statement?The reason I am asking this is, I
am doing more than one dcl in the statement, I may get a 'table
already exists' or 'parent row not found' errors. I just want to log
them in a table instead of running the SP and piping the output to a
text log,go through the rigor of reading it. Please help..
There is a build in condition SQLEXCEPTION which catches all errors.
Now I STRONGLY advise not to use that one for a CONTINUE HANDLER.
Continue handlers should always be specific.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Mar 20 '08 #2
Thanks Sarge. I understood what you meant!
Mar 20 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Siemel Naran | last post by:
(1) About std::exit. If I call this function, will the system call the destructors of all objects in the call stack. Eg. void f() { std::exit(1); } void g() { X x; f(); } Does the call in...
3
by: Gary | last post by:
I am developing a simple DB-Library program in C calling SQL Server 2000 on windows 2003 and NT 4. I have some T-SQL code that checks for the existence of a table and want to abort the program if...
2
by: Bill Smith | last post by:
I cannot get a 'continue' handler to work within a 'before insert' trigger....The line set nnn.name='Bill'; never gets executed. If I do an insert on the table, I get the 99001 error I also tried...
7
by: deko | last post by:
I have a function with a number of long loops. While the function is running, I want to be able to click a Stop button and exit the function as quickly as possible. The abbreviated code looks...
1
by: ori | last post by:
Hi, I'm facing a problem when trying to continue normal execution flow within a HttpHandler ProcessRequest method. In my application we currently have a custom HttpHandler registered which...
2
by: GGerard | last post by:
Hello Is there a way to exit all running procedures with one command? Sometimes a procedure(1) will call another procedure(2) which could call a third procedure(3) and what I would like to...
2
by: Max | last post by:
This either just started happening on PHP 5 or I never noticed the errors in the error logs before. In an if construct, if a certain condition is present, I want to exit the entire script, so...
5
by: lemlimlee | last post by:
hello, this is the task i need to do: For this task, you are to develop a Java program that allows a user to search or sort an array of numbers using an algorithm that the user chooses. The...
13
by: Andrew Falanga | last post by:
HI, Just a warning, I'm a javascript neophyte. I'm writing a function to validate the contents of a form on a web page I'm developing. Since I'm a neophyte, this function is quite simple at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.