TOracleDataSet and LockPoint

ThomyKay

Member²
I wrote my own SQL resolver component working on OnApplyRecord event of TOracleDataSet. It does ArrayDML catching all the changes in TOracleDataSet and executing the ArrayDML operations in intervals. When catching the update/insert/delete action the only thing I do is getting the changed field values and the key values.
The problem is that TOracleDataSet executes 'savepoint DOA__LOCKPOINT' in each case, no matter if I handle lock actions by myself and how the LockingMode property is set. It's bad, because it results in useless network roundtrips. How can I prevent TOracleDataSet from calling the LockPoint procedure?
 
The TOracleDataSet assumes that you are actually processing the updates, so it will always set a savepoint and rollback if necessary. Only if CachedUpdates = True these savepoints will be omitted, so maybe you can make use of that.

------------------
Marco Kalter
Allround Automations
 
When bound to a TDataSetProvider (in MIDAS env) the OracleDataSet doesn't do the LockPoint. What exactly is the trigger to execute the LockPoint procedure - CachedUpdates and ...? Something in IProviderSupport? I'm doing the update with 'ResolveToDataSet'. Can't find the line in your code....
 
When updates are applied through a TDataSetProvider, it uses the same CachedUpdates mechanism. Therefore there are no savepoints per record, but one savepoint for all cached updates.

------------------
Marco Kalter
Allround Automations
 
Back
Top