I create a new form and put a TZConnection. Change the property AutoCommit to false.
When I try to start a transaction occurs this error:
Code: Select all
ZConnection1.StartTransaction;
To solve this problem I change the procedure TZAbstractConnection.StartTransaction to this:[Debugger Exception Notification]
Project projectSqlDB raised exception class 'EZDatabaseError' with message:
Invalid operation in non AutoCommit mode
In file 'C:\lazarus\zeosdb\src\component\ZAbstractConnection.pas' at line 959:
raise EZDatabaseError.Create(SInvalidOpInNonAutoCommit);
Code: Select all
procedure TZAbstractConnection.StartTransaction;
begin
// CheckAutoCommitMode; // llutti comment
if FExplicitTransactionCounter = 0 then
AutoCommit := False;
DoStartTransaction;
Inc(FExplicitTransactionCounter);
CheckAutoCommitMode; // llutti moved
end;
I Using Lazarus 1.7 and Zeos 7.2beta.
Regards,
Luciano