Subject | Re: [firebird-support] Catching exception fails under isql |
---|---|
Author | Thomas Steinmaurer |
Post date | 2013-03-08T16:08:15Z |
> 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