now I am desperate, because I cannot make the old transction behavoiour in InterBase.
The first help I got was:
That's impossible, because I have a project with 1 TUniConnection, circa 2000 TUniQueries and circa 800 TUniTables. I cannot add nearly 3000 transactions to this project.To solve the issue you can use the following advice:
- use for dataset a separate transaction, not a default transaction TUniConnection;
- use for data modification UpdateTransaction.
The second idea was:
Okay, I set "OldTransactionBehaviour := true;". But this not enough, because Rollback has not worked. See here: viewtopic.php?f=28&t=34870In order to provide backward compatibility with older UniDAC versions, we added the OldTransactionBehaviour global variable declared in "Uni.pas". The default variable value is "False". So, if you want to have old behaviour, you should set the variable to "True".
There ViktorV wrote:
When I set TUniConnetcion.AutoConnect = false, I have to add ten thousands of commits to my project. Or I have to change 3000 Datasets. This is not practical.So, to solve the issue, please set the AutoCommit property to False for TUniConnection or dataset.
Since more than 20 years the normal use of transactions is:
Code: Select all
UniConnection1.StartTransaction;
try
( .. make some changes ...)
UniTable1.Post;
UniTable2.Post;
UniTable3.Post;
UniConnection1.Commit;
except
UniConnection1.Rollback;
end;BTW, my project works with InterBase, MS SQL Server, Oracle and PostgreSQL. I need one code for all. That's my reason for the use of UniDAC.
Kind regards,
Gerd Brinkmann
invent GmbH