Subject | Re: Detecting which FK has been violated within a SP |
---|---|
Author | Adam |
Post date | 2006-02-15T05:05:49Z |
>That's a shame. I know from the exception message the name of the FK
> There won't be a magic context variable. :-)
constraint, just thought I might be able to grab it.
>Will have to do it this way. I can catch the FK violation
> But, in your handler, you can query the primary tables in the same
> order of battle to find which key is missing, with the objective of
> then raising a custom exception identifying the offending key,
> logging out to an external table, or whatever.
SQLCode/GDSCode so I can do it there.
Thanks
Adam