Subject Cached Updates Problem with DML
Author Marcel Brink

I have a major problem using Cached updates on TIBOQueries with
DMLFlags set through the InternalDataset.
The situation is this:

1 TIBOQuery (Master) "Select * from Master" (All DMLFlags are set).
1 TIBOQuery (Detail) "Select * from Detail where MasterID:=ID" (All DMLFlags
are set).
1 TDatasource for making the Master-Detail relation.
KeyLinks are set properly, no doubt about it.

When editing the Details of an Existing Master record, everything
works fine.

When Inserting a new Master Record and 1 or more Detail Records for
that Master Record i have a problem when the updates are being applied
to the Database. This due to the DML receive Flags which are set on the
Master IBOQuery.
- First the Master Record is Being applied to the Database.
- The Detail IBOQuery receives an DMLCacheItem. (nothing so far).
- Then the Detail Record(s) are being applied to the Database.
- When the DMLCacheItem is received by the Master IBOQuery
it seems like IBO is trying to post the master record again,
since i get an AV "Dataset not in Edit or Insert Mode".

Has anyone experienced such behavior and knows how to solve this ?
It's really a big issue to me. I now use a simple workaround by setting the
DMLFlags of the Master IBOQuery only with the AnnounceFlags.

Thanks in Advance.

Marcel Brink