Using InterBase with FireDAC

From RAD Studio
Jump to: navigation, search

Go Up to Working with DBMS (FireDAC)


Transaction Wait Time

To use Transaction Wait Time with FireDAC, use the following code:

FDConnection1.TxOptions.Params.Clear;
FDConnection1.TxOptions.Params.Add('wait_time=1000'); // 1000 seconds
FDConnection1.StartTransaction;
try
  // perform required DB actions
  FDConnection1.Commit;
except
  FDConnection1.Rollback;
  raise;
end;

Exclusive Isolation Level

To use Exclusive Isolation Level with FireDAC, use the following code:

FDConnection1.TxOptions.Isolation := xiUnspecified;
FDConnection1.TxOptions.Params.Clear;
FDConnection1.TxOptions.Params.Add('exclusive');
FDConnection1.StartTransaction;
try
  // perform required DB actions
  FDConnection1.Commit;
except
  FDConnection1.Rollback;
  raise;
end;

See Also