|
date: Mon, 29 Jan 2018 17:11:41 -0500
from: dlclark@xxxxxxxxxxxxxxxx
subject: Re: SQL Exception Handlers
"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 01/26/2018
02:30:45 PM:
When you have declared an SQL Exception handler, how do you makeoccurs.
an exception for a particular exception? For example...
I have a script that creates an alias in QTEMP during execution.
But, if any other exception occurs, the alias is left in QTEMP. So, I
want to clean up this possibility when the script first starts. This
works if the alias is there. But, if it is not there an exception
I want to detect this situation and ignore the exception.exception
I even tried doing the DROP within the exception handler itself so
that the alias wouldn't be left in QTEMP at all. However, if an
occurs before the alias first gets created, then the exception handlerstatement-by-statement
throws an error during the DROP and the original exception never gets
displayed.
I also thought of creating an SQL Continue handler for the
specific SQL State, but I don't want this SQL State to always continue.
The potential exists for the same SQL State to occur in other places in
the script and I don't want those situations handled the same.
Is there a way to to be even more selective with handlers --
without having to go to the extreme of doing completely away with all
handlers and then having to do error checking on a
basis?
How do I handle all this? Thanks.
No responses on this?
Sincerely,
Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300
Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.