Subject Re: [firebird-support] Handling GDSCODE
Author Helen Borrie
At 04:44 AM 19/10/2005 +0000, you wrote:
>I'm trying handle GDSCODE but an error occurs when I compile the
>procedure.
>I wrote
>
>.....
>WHEN GDSCODE 335544665 DO
>BEGIN
> MSG='.........';
> SUSPEND;
>BEGIN
>
>and error -104 ocurred.
>
>Could someone help me?

Yup. The PSQL engine expects the constant name for the gdscode, so you
need to write

WHEN GDSCODE unique_key_violation DO
BEGIN
MSG='.........';
SUSPEND;
BEGIN

There is a full downloadable list of codes, constants and messages in the
Knowledgebase area of the Firebird website.

./heLen