[Lazarus] SQLdb: Pseudo Transaction?

Luca Olivetti luca at wetron.es
Wed Jul 1 11:40:54 CEST 2020


El 1/7/20 a les 0:40, R.Smith via lazarus ha escrit:
> On 2020/06/30 22:52, 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?
>> Regards --  Joe
> 
> I'm sorry, the previous problem was SQLite-related, which I'm 
> initimately familiar with, but this one seems to be a Lazarus DB 
> component requirement which I'm not so much familiar with, but probably 
> has an easy solution someone here might know about.
> 
> The question becomes:  How to execute a query, without a transaction 
> being set, using SQLdb in Lazarus?

I use zeos instead of sqldb. Most probably it's my fault and it could be 
solved by doing what Michael said (use stoUseImplicit), but when I tried 
to use sqldb with sqlite, as long as I kept the dataset open (to show 
the data in a dbgrid) the table was locked and couldn't be modified by a 
different thread/process.
Probably just a matter of different defaults (zeos doesn't need a 
separate transaction component and the default TransactionIsolationLevel 
is tiNone).

Bye
-- 
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007


More information about the lazarus mailing list