IBX IBTransaction lazarus / 16-Databases ---------------------------------------------------------------------- sydenis · 2024-10-04 08:14 Please tell me about IBTransaction - what is the difference between: 1. Active := true  and  StartTransaction 2. Active and InTransaction ---------------------------------------------------------------------- rvk · 2024-10-04 09:37 1. TIBTransaction.Active := true will rollback a possible current running transaction and start a new one. TIBTransaction.StartTransaction will give you an exception if the transaction is already running. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TIBTransaction.SetActive(Value: Boolean);begin  if csReading in ComponentState then    FStreamedActive := Value  else    if Value and not InTransaction then      StartTransaction    else      if not Value and InTransaction then        Rollback;end; 2. Reading the properties TIBTransaction.Active and TIBTransaction.InTransaction are the same Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  public  property InTransaction: Boolean read GetInTransaction;published  property Active: Boolean read GetInTransaction write SetActive; ---------------------------------------------------------------------- sydenis · 2024-10-04 09:45 Thank you. It became clear! ---------------------------------------------------------------------- tonyw · 2024-10-08 15:01 Quote from: rvk on October 04, 2024, 11:37:21 am1. TIBTransaction.Active := true will rollback a possible current running transaction and start a new one. Not quite true. Setting an active transaction to false will rollback the current transaction. Setting an active transaction to true is a no op ---------------------------------------------------------------------- rvk · 2024-10-08 15:06 Quote from: tonyw on October 08, 2024, 05:01:29 pmQuote from: rvk on October 04, 2024, 11:37:21 am1. TIBTransaction.Active := true will rollback a possible current running transaction and start a new one. Not quite true. Setting an active transaction to false will rollback the current transaction. Setting an active transaction to true is a no op That's why I said "possible current running transaction". If there is no current transaction, rollback is of course not possible