Subject Re: [firebird-support] Trapping Foreign Key violations in SQL
Author Artur Anjos
Hi Tim,

> In other words, I have foreign key constraints on Tax_Type, Account_Type
> and Account_Number. How would I identify exactly which one(s) of these
have
> been violated so that I can pass a more accurate message back to the user
> from the database?

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.

Artur