[Lazarus] SQLdb: Pseudo Transaction?

Michael Van Canneyt michael at freepascal.org
Tue Jun 30 23:47:20 CEST 2020



On Tue, 30 Jun 2020, Special via lazarus wrote:

> Hi, Ryan,
>
> I followed your advice and removed XTransaction and all references to it 
> from TestButtonClick. But now I get an exception with the message 
> "Transaction not set". Any hint?

With SQLDB you always need a transaction component.

What you can do is set stoUseImplicit in the Transaction.Options:

https://www.freepascal.org/docs-html/current/fcl/sqldb/tsqltransaction.options.html

In that case the implicit transaction handling of the DB engine (SQLite in
this case) will be used, no explicit transaction statements will be emitted.

Michael.


More information about the lazarus mailing list