Subject | Re: [firebird-support] Trapping Foreign Key violations in SQL |
---|---|
Author | Tim Ledgerwood |
Post date | 2003-09-16T11:42:47Z |
>Hi Artur,
>Use CONSTRAINT on your foreign keys, to give them a unique name. Something
>like:
>
>YourField YourFieldType CONSTRAINT Name_Here REFERENCES
>YourTable(blablabla)
>
>This way you can parse the message to get the constraint name.
I have already named the constraints - how do I get the message text in
SQL? It's easy enough to write :
WHEN SQLCODE -803 DO EXCEPTION xyz
but how do I get the associated text in a Stored Procedure?
Thanks in advance,
Tim
[Non-text portions of this message have been removed]