Subject | RE: [firebird-support] Catching exception fails under isql |
---|---|
Author | Rick Debay |
Post date | 2013-03-11T16:04:28Z |
The isql script drops the procedure (which should fail as it doesn't
exist), creates it, uses it, drops it, then exits.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Thomas
Steinmaurer
Sent: Friday, March 08, 2013 11:08 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Catching exception fails under isql
you are developing/changing the SP in DBW?
Thomas
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
exist), creates it, uses it, drops it, then exits.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Thomas
Steinmaurer
Sent: Friday, March 08, 2013 11:08 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Catching exception fails under isql
> Does anyone have any insight in to this?Are you sure that isql sees the most recent version of the SP, in case
>
> Running this statement in isql:
>
> EXECUTE PROCEDURE P_IMPORT;
>
> Yields this error:
>
> Statement failed, SQLCODE = -508
> no current record for fetch operation
> -violation of PRIMARY or UNIQUE KEY constraint
>
> Yet running the same statement in Database Workbench yields no error.
> The procedure is written to ignore unique_key_violation:
>
> FOR SELECT
> COL1, COL2 , ...
> FROM
> P_SELECT
> INTO
> :COL1, :COL2, ...
> DO BEGIN
>
> INSERT INTO
> THE_TABLE (
> COL1, COL2, ...
> )
> VALUES (
> :COL1, :COL2, ...
> );
>
> WHEN GDSCODE unique_key_violation DO COL_1=NULL;
you are developing/changing the SP in DBW?
Thomas
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links