we are using IBDAC 3.10 with firebird 2.1 and we got the following problem:
Both Queries insert data in Table1. Behind the modified Table in the database is a trigger, which executes a stored procedure. This StoredProc modifies a second table.MyIBCQueryB.SQL.Text := 'Select * from Table1 where ID = -1';
MyIBCQueryB.Open;
MyDatabase.StartTransaction;
MyIBCQueryA.SQL.Text := 'Insert into Table1(ID) values(1)';
MyIBCQueryA.ExecSQL;
MyIBCQueryB.Insert;
MyIBCQueryB.FieldByName('ID').AsInteger := 2;
[...]
MyIBCQueryB.Post;
[...]
Because of the transaction, the MyIBCQueryB.Post; raises an exception caused by a lock conflict on the second table. The changes are gone.
This problem seems to exist just in the case mentioned above.
In the normal case we are able to set the Query's transactions to prevent lock conflicts, but here we already got an open Query before we start the transaction - and setting the Query's transaction would close the Query.
Do you see a solution?
Why do you disconnect the DataSet in TCustomIBCDataSet.SetTransaction? Is it possible to call TCustomDADataSet.SetTransaction without disconnect?
Regards