[Lazarus] SQLite - disk I/O error only on virtual machine
Michael Van Canneyt
michael at freepascal.org
Fri Mar 8 09:04:14 CET 2013
On Thu, 7 Mar 2013, Krzysztof wrote:
> Hi,
> I noticed strange behavior when running application on virtualbox linux mint 14 64bit machine. This occur only when I attach second
> database to sqlite3connection and then call SQLTransaction.Commit. This is my code:
>
> try
> FConn := TMySqlite3Connection.Create(Self);
> FConn.Transaction := SQLTransaction1;
> FConn.DatabaseName := IncludeTrailingBackslash(ProgramDirectory)+'db1.sqlite';
> FConn.Connected := True;
> FConn.ExecSQLNoTrans('attach database '+
> QuotedStr(IncludeTrailingBackslash(ProgramDirectory)+'db2.sqlite')+' as d2');
>
> FConn.ExecuteDirect('create table if not exists a(col integer)');
> FConn.ExecuteDirect('create table if not exists d2.b(col integer)');
AFAIK these commands are automatically committed by SQLite.
see e.g.
http://sqlite.1065341.n5.nabble.com/DDL-statements-in-transactions-td37849.html
Michael.
More information about the Lazarus
mailing list