[Lazarus] SQLDB: how to use TSQLTransaction

Michael Van Canneyt michael at freepascal.org
Thu Apr 16 13:57:23 CEST 2015



On Thu, 16 Apr 2015, William Ferreira wrote:

> 
> 
> - An option to TSQLTransaction, called stoUseImplicit, which means the implicit transaction handling of the engine will be used.
>    (SQLDB then simply doesn't start a transaction)
>
>    This has the effect that every statement will then be committed at once.
> 
> - An option to TSQLQuery called sqoAutoCommit, which will commit each statement at once.
>    i.e. it calls SQLTranaction.Commit after each command.
> Sorry, I thought that was a mission to TSQLTransaction.Action as it accepts some values like caCommitRetaining or caRollback. So, how does this property works?

Action determines what happens if you call EndTransaction, 
and that is called when the transaction instance is destroyed.

Michael.




More information about the Lazarus mailing list