[Lazarus] SQLDB - Can't attach second SQLite database because transaction

Krzysztof dibo20 at wp.pl
Mon Jan 7 14:26:44 CET 2013


Hi,

I want attach second databse to sqlite connection by command:

DBConnection.ExecuteDirect('attach database
'+QuotedStr(GetConfigDir+'second.db')+' as mydb2');

But I get error that cannot attach database when on transaction. Even If I
commit transaction first, then ExecuteDirect start new one. How to get
around this?

BTW: Why SQLDB has logic "always in transaction"? Is it really perform in
large and complex ERP systems? What I was always taught that the
transaction should be used only in specific situtations (importing,
converting documents, FIFO, stock status etc) but whole time? Is not
dangerous? One programmer's mistake (e.g forget commit somewhere, or
transaction conflict etc.) and client can loose bunch of data.

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130107/72e47e2b/attachment-0002.html>


More information about the Lazarus mailing list