I can't get concurrent updates working
I created a new test program that only has a ZConnection component with Transaction Isolation set to read commited, and a Timer. The timer code is this:
Code: Select all
procedure TForm2.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := false;
ZConnection1.AutoCommit := false;
with TZQuery.Create(nil) do try
SQL.Text := 'update nextrans set pizza=pizza+1 ';
Connection := ZConnection1;
ExecSQL;
finally
Free;
end;
Timer1.Enabled := True;
ZConnection1.AutoCommit := true;
end;
SQL Error: lock conflict on no wait transaction deadlock update conflicts with concurrent update concurrent transaction number is 5759. Error Code: -901. Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.
Just in case here's my ZConnection dfm:
Code: Select all
object ZConnection1: TZConnection
ControlsCodePage = cGET_ACP
AutoEncodeStrings = False
Properties.Strings = (
'no_record_version'
'controls_cp=GET_ACP')
TransactIsolationLevel = tiReadCommitted
Connected = True
Port = 0
Database = 'POS'
User = 'sysdba'
Password = 'masterkey'
Protocol = 'firebird-2.5'
Left = 440
Top = 128
end