Code: Select all
ZCon.TransactIsolationlevel := tiSerializable;
ZCon.AutoCommit := true;
ZCon.StartTransaction;
try
ZQGeneral.Close;
ZQGeneral.SQL.Clear;
ZQGeneral.SQL.Add('UPDATE table1 SET field1 = 1 WHERE id = 2');
ZQGeneral.ExecSQL;
ZQGeneral.Close;
ZCon.Commit;
ZCon.TransactIsolationlevel := tinone;
ZCon.AutoCommit := False;
except
ZCon.Rollback;
ZCon.TransactIsolationlevel := tinone;
ZCon.AutoCommit := False;
end;
I also tryed tiReadCommited and tiUnreadCommited with the same behavior.