Problems fetching records with doa__rowid

rmgomes

Member
Marco,
We are using the TOracleDataSet component to update view records. We have set the property UniqueFields with the view primary key column and CachedUpdates to TRUE. Sometimes the updating process of one of the result set records modifies other records through database triggering statements (eg. when record #1 was applied to database, the trigger event changed some columns of record #2 that was not applied yet), leading OracleData.FetchRecord procedure to error message "Record has been deleted by another user." when property LockingMode is set to lmCheckImmediate because it tests record existence using Rowid and not the key specified by UniqueFields. When property LockingMode is set to lmLockImmediate, the problem doesn't occur, but records could be locked "forever"... . Our application needs the UniqueField value to check records instead of using Rowid because when a record is updated, a version of it is created (with new rowid) and the original record still have the old rowid value, but is not queried by the view anymore (the application works like Oracle Space Manager record versioning system). Can you help us
 
You could set LockingMode to lmCheckImmediate, and to lmNone when you call ApplyUpdates. For updates and deletes the dataset will wait for locks, but this may be a limited risk.

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