RAD Studio VCL Reference
|
Initiates a new transaction in the associated database.
function BeginTransaction: TDBXTransaction;
__fastcall TDBXTransaction BeginTransaction();
Call BeginTransaction to start a new transaction against a database server that supports transactions. (MySQL servers do not support transactions.) You can check the TransactionsSupported property to determine whether the server supports transactions. If the server does not support transactions, BeginTransaction does nothing.
The method returns a TDBXTransactioninstance.
If the transaction is successfully started, BeginTransaction sets the InTransaction property to true.
Updates, insertions, and deletions that take place after a call to BeginTransaction are enlisted in that transaction until another overlapping transaction is started or until the application calls CommitFreeAndNil to save the changes or RollbackFreeAndNil to cancel them.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|