Transactions

ctiedeman

Member²
I am converting a MIDAS BDE application to DOA and I can not seem to get transactions to work as I would expect them to. After every Clientdataset.ApplyUpdates call, a Session.Commit gets executed, which appears to release my savepoints. (my OracleDataSets.CommitOnPost = False)

Example BDE code:
db.Open;
db.StartTransaction;
try
CDS1.ApplyUpdates(0);
CDS2.ApplyUpdates(0);
db.Commit;
except
on E: Exception do db.Rollback;
end;

DOA code:
Session.Logon;
Session.SavePoint('SP1');
try
CDS1.ApplyUpdates(0);
CDS2.ApplyUpdates(0);
Session.Commit;
except
on E: Exception do Session.RollbackToSavepoint('SP1');
end;

Is there a different way of accomplishing this?

TIA
 
This is currently not possible. The ApplyUpdates will implicitly end the transaction, regardless if one was already started or not. We hope to fix this in the next patch release.

------------------
Marco Kalter
Allround Automations
 
Are there any guesses as to when the next patch could be released? (I mainly need to know if it is measured in weeks or months since this is a must have feature for us)
 
Back
Top