Subject | Re: [firebird-support] Trapping Foreign Key violations in SQL |
---|---|
Author | Artur Anjos |
Post date | 2003-09-16T10:52Z |
Hi Tim,
like:
YourField YourFieldType CONSTRAINT Name_Here REFERENCES
YourTable(blablabla)
This way you can parse the message to get the constraint name.
Artur
> In other words, I have foreign key constraints on Tax_Type, Account_Typehave
> and Account_Number. How would I identify exactly which one(s) of these
> been violated so that I can pass a more accurate message back to the userUse CONSTRAINT on your foreign keys, to give them a unique name. Something
> from the database?
like:
YourField YourFieldType CONSTRAINT Name_Here REFERENCES
YourTable(blablabla)
This way you can parse the message to get the constraint name.
Artur