× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



For fun I modified Ted Holts example. Works great to trap errors.

Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx

-------------------------------------------------------------------------
create or replace procedure QGPL.CreatePlants

set option dbgview = *source,
commit = *none

begin
declare v_Error char(1) default '0';
declare v_ErrorCount integer default 0;

declare Table_Exists condition for sqlstate '42710';
declare Table_NotFound condition for sqlstate '42704';

declare continue handler for Table_Exists
begin
set v_Error = '1';
set v_ErrorCount = v_ErrorCount + 1;
end;

declare continue handler for Table_NotFound
begin
set v_Error = '1';
set v_ErrorCount = v_ErrorCount + 1;
end;

-- Drop table. Error handled by Table_NotFound
drop table qgpl.plants;

-- Drop table. Error handled by Table_Exists
create table qgpl.plants
( ID dec(3), Location varchar(16),
primary key (ID));
label on table plants is 'Plant master';

end;
-------------------------------------------------------------------------

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.