[Lazarus] SQLDB: how to use TSQLTransaction

William Ferreira williamoferreira at outlook.com
Thu Apr 16 15:01:31 CEST 2015


So, after a TSQLTransaction.Commit should I calll a TSQLTransaction.EndTransaction?

I think should be friendly and usefull if TSQLTransaction.Action works as a default action for transaction managing. If you set it as <i>caNone</i> you * MUST * manage it manually. But, I know that this modification should break a lot of past projects.....

William de Oliveira Ferreira


Programador Web/Desktop


> (32) 8412 1897 - Whatsapp 

> Date: Thu, 16 Apr 2015 13:57:23 +0200
> From: michael at freepascal.org
> To: lazarus at lists.lazarus.freepascal.org
> Subject: Re: [Lazarus] SQLDB: how to use TSQLTransaction
> 
> 
> 
> 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.
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150416/904045b4/attachment-0003.html>


More information about the Lazarus mailing list