Subject Re: [IBO] Delete problem in Multi-User environment
Author Geoff Worboys
> As you can see below, the CheckOperation takes place in
> TIB_Dataset. Within the CheckOperation it checks to see
> if the ErrorEvent is assigned. Even if I assign the OnError
> or OnDeleteError event they are not triggered.

Excuse my blundering around a bit, I dont use the TIBO*
components and so I am not very familiar with them.

I can see with a closer look that the code I thought should
be called only applies to TIBOUpdateSQL, and that is only
used with custom insert/update/delete sql attached to
TIBOTable or TIBOQuery. Without this only the internal
dataset processes get called, resulting in what you see.

The OnDeleteError (and similar) items are not linked
up in anyway, making them rather pointless with IBOQuery
(AFAICT).

TIBODataset.OnError is linked up to the normal internal
dataset processing, linkage to there would give feedback for
ISCError events.

Of course the problem is that this particular exception
does not come from the server, it comes from the IBO code
where it detects that the delete statement did not delete
any rows.

The only work-around without updates to IBO that I can see,
would be to write your own insert/update/delete statements
into an instance of TIBOUpdateSQL and attach that to your
query.

When Jason has time he might look at the idea of generating
his EIB_DatasetError exceptions from a virtual function.
Then in the TIBOInternalDataset derivation this could be
overridden to generate EDatabaseError exceptions instead.
These would be detected by the TDataset.CheckOperation
method and result in the relevant OnXxxxxError handlers
begin fired as expected.

(If you are game you could experiment with this yourself
and pass on the results to Jason if they work as you want.)

--
Geoff Worboys
Telesis Computing