Can someone tell me what the error is?

with IBQuery1 do begin SQL.Clear; SQL.Add (query); if not IBTransaction4.Active then IBTransaction4.StartTransaction; try ExecSQL; IBTransaction4.Commit; except IBTransaction4.Rollback; end;

    1 answer 1

    IBQuery1.Close; IBQuery1.SQL.Clear; IBQuery1.Sql.Add(''); IBQuery1.Open; 

    Your query is not recorded in IBQuery1.Sql and look at it yourself (just throw a Memo1 on the form):

     SQL.Add(запрос); Memo1.Text:=SQL.Text; 
    • I also thought so at first, however, the data is entered into the database, and the error crashes when the transaction is confirmed - Alexander
    • It is not recommended to start or end transactions by calling the IBTransaction.Active property to remove the condition if not IBTransaction4.
    • @NMD recorded the data in the memo before confirming the tranzakia - a request in place - Aleksandr
    • You already said this - NMD
    • @NMD removed the condition, however, the problem did not dare: the data is written to the database, but the error crashes. - Aleksandr