dejanlikar
Member
I have noticed that TOracleDataSet executes a Commit statement if CachedUpdates is set to FALSE. I can not set the CachedUpdates property to TRUE because then I would have to use ROWID in select statement. We have our own TIQuery component which is derived from TOracleDataSet/TQuery, depends on conditional defines DOA/BDE (at least in theory
When working with DOA we use OnApplyRecord event from TOracleDataSet to do the work. (We parse statements from TUpdateSQL and then execute them in TOracleQuery.)
Imagine now you have two queries on which you issue ApplyUpdates. Now something goes wrong with the second one and there is no way to Rollback the entire transaction because Commit statement (InternalInsertUpdate in OracleData unit) was issued after the first one.
Would the following code be OK even if the Commit statement is issued:
Savepoint('INFONET')
try
quOne.ApplyUpdates;
quTwo.ApplyUpdates;
except
RollbackToSavePoint('INFONET');
end;
Dejan Likar

When working with DOA we use OnApplyRecord event from TOracleDataSet to do the work. (We parse statements from TUpdateSQL and then execute them in TOracleQuery.)
Imagine now you have two queries on which you issue ApplyUpdates. Now something goes wrong with the second one and there is no way to Rollback the entire transaction because Commit statement (InternalInsertUpdate in OracleData unit) was issued after the first one.
Would the following code be OK even if the Commit statement is issued:
Savepoint('INFONET')
try
quOne.ApplyUpdates;
quTwo.ApplyUpdates;
except
RollbackToSavePoint('INFONET');
end;
Dejan Likar