Hi,
Delphi 2010 UniDAC (3.50.0.13) with PostgreSQL (SecureBridge 3.00.0.2). I have two tables, A and B in a master detail relationship. I'm using pessimistic locking with a TUniQuery on table A and I'm not using CachedUpdates. I start a transaction, then edit the master record A and add a record to table B using another TUniQuery. When done I post the records and commit the transaction. The events I observe (with dbMonitor) are:
Start:
Savepoint LOCK_qTableA
Select * from TableA
Insert into B
Rollback to savepoint LOCK_qTableA (???????)
Commit
I guess 'm not surprised that this confirms my observation of loosing the updates.
Can you please explain why UniDAC is executing a Rollback to savepoint?
kind regards,
Jan
Pessimistic lock & rollback to savepoint = loosing changes??
Hello,
I cannot reproduce the problem.
Please try to download the latest version of UniDAC (4.0.1) and SecureBridge (3.00.0.6) and reproduce the problem with these product versions.
If you reproduce the problem, please send us a demo project and a script to create tables to alexp*devart*com. Also please specify the exact versions of your IDE and PostgreSQL.
I cannot reproduce the problem.
Please try to download the latest version of UniDAC (4.0.1) and SecureBridge (3.00.0.6) and reproduce the problem with these product versions.
If you reproduce the problem, please send us a demo project and a script to create tables to alexp*devart*com. Also please specify the exact versions of your IDE and PostgreSQL.
Hi Alex,
I have a bit more information. Please note that although I do call the Edit method of the Dataset for record A I do not change anything. The workaround I have found is to always update the master record when updating a detail record (fortunately I have something sensible to update in the master record). The events I observe in that case are:
Start:
Savepoint LOCK_qTableA
Select * from TableA
Update A ...
Insert into B ...
Commit
(ie there is no release savepoint but as far as I know that is not required)
I have scheduled an update of components in a couple of weeks, at which time I'll also upgrade UniDAC.
thanks,
Jan
I have a bit more information. Please note that although I do call the Edit method of the Dataset for record A I do not change anything. The workaround I have found is to always update the master record when updating a detail record (fortunately I have something sensible to update in the master record). The events I observe in that case are:
Start:
Savepoint LOCK_qTableA
Select * from TableA
Update A ...
Insert into B ...
Commit
(ie there is no release savepoint but as far as I know that is not required)
I have scheduled an update of components in a couple of weeks, at which time I'll also upgrade UniDAC.
thanks,
Jan