3

How can I check if the DBMS has support for Transactions, using FireDac components?
Usually, I use something like the follow code, to perform a transaction in my DAO class, using dbExpress.

...
connection: TSQLConnection;
dbxTransaction: TDBXTransaction;
... 

if (connection.TransactionsSupported) AND ((not connection.InTransaction) OR (connection.MultipleTransactionsSupported)) then
begin
    dbxTransaction := connection.BeginTransaction(TDBXIsolations.ReadCommitted);
end;

So, what are the correspondents properties in FireDac that I use in dbExpress:
TransactionsSupported
InTransaction
MultipleTransactionsSupported

Thanks in advance.

rodrigopandini
  • 945
  • 1
  • 7
  • 18

1 Answers1

6
  • TransactionsSupported - TFDConnection.ConnectionMetaDataIntf.TxSupported
  • InTransaction - TFDConnection.InTransaction
  • MultipleTransactionsSupported - TFDConnection.ConnectionMetaDataIntf.TxMultiple
da-soft
  • 7,670
  • 28
  • 36