Subject Re: [IBO] on delete restrict - details
Author Geoff Worboys
> I want to show the user some more detailed information, when he
> wants to delete a record and gets a constraint error. Is there any
> useful way to get an information which records cause this error? I
> think at something like to show a list of this records.

I presume you mean something along the lines of extracting the
offending table name and error codes etc from the message and then
pulling he relevant details from the metadata.

It gets complicated. At this time I think the only way is parsing the
message itself (which could vary from language to language) - or
putting in error handling around specific datasets where you know what
the constraints are. Quite some time ago I considered installing
changes in IBO's error handling so that the core error details were
more easily accessible - but I never got around to it.

Another way around the problem is to write your own delete restriction
triggers that generate customised exception messages according to the
situation. This is much simpler to do, but is a lot of work on a
large/complex database.

Geoff Worboys
Telesis Computing