Re: [sqlite] SQLite in WinCE Emulator - Disk I/O Error and change of pragma don´t work
According to the MSDN support sites, there are a couple of known issues with the Windows Mobile Emulator, when using emulated storage cards. With an emulated storage card, SetEndOfFile() (which we use for truncating a file) and FlushFileBuffers() (which we use for syncing) will fail. They do not fail for a real storage card or for other emulated storage. These errors are handled by SQLite and reported to the calling application. Possible work arounds for you when using emulated storage cards include: -Adding the define SQLITE_NO_SYNC and using the "PRAGMA journal_mode = PERSIST" journaling modes -Use system storage instead of an emulated storage card These would only be needed when testing on the emulator with an emulated storage card. Regards. -Shane On Tue, Dec 7, 2010 at 2:53 PM, Horacio Rabelo Pereirawrote: > Hi, all > > > I'm using SQLite version 3.7.2 ported to Windows CE, in a application > developed using Lazarus > > > I got the compiled SQLITE3.DLL for Windows CE in the site www.parmaja.com > > > For now, I am using one emulator to run the native Windows CE application > in a desktop computer running Windows 2000 SP4. > > > That emulator is the Microsoft Device Emulator V3. > > > Well, considering that is the first time I work in the environment, I made a > little application in Lazarus that load text files to the SQLite database. > > > The process was done well, until the moment that will close execute the > command “commit”. I this moment the application crashes showing the message > “Disk I/O Error”. > > > During the execution, the journal file for database is created, and after the > crash it is removed and the database file remains without any modifications. > > > Searching in the Web, I found a note describing a workaround, that consist in > change the pragma “jornal_mode” to value “truncate”. > > > For my surprise, all my tries to change the value of pragma “journal_mode” > don't work. I try change via SQL DDL script, via SQL Expert and via > application. > > > In all the cases, when I access the database after the changes, the values of > pragma “journal_mode” it ever “delete”, not the value that I change. I try > “truncate”, “memory”, etc, without any success. > > > In resume, I have two problems > > 1)The “Disk I/O Error” when I try to commit the transaction (running in a > Windows CE Emulator) > > 2)The change of value of pragma that don't work. > > > Thanks in advance > > Horacio Pereira > Belo Horizonte – MG – Brasil > hora...@bysat.com.br > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite in WinCE Emulator - Disk I/O Error and change of pragma don??t work
On Tue, Dec 07, 2010 at 06:08:28PM -0200, Horacio Rabelo Pereira scratched on the wall: > Searching in the Web, I found a note describing a workaround, that > consist in change the pragma ???jornal_mode??? to value ???truncate???. > > For my surprise, all my tries to change the value of pragma > ???journal_mode??? don't work. I try change > via SQL DDL script, via SQL Expert and via application. This PRAGMA is a property of the active database connection, not the database file. You need to re-set it every time you call sqlite3_open_v2(). -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite in WinCE Emulator - Disk I/O Error and change of pragma don´t work
Hi, all I'm using SQLite version 3.7.2 ported to Windows CE, in a application developed using Lazarus I got the compiled SQLITE3.DLL for Windows CE in the site www.parmaja.com For now, I am using one emulator to run the native Windows CE application in a desktop computer running Windows 2000 SP4. That emulator is the Microsoft Device Emulator V3. Well, considering that is the first time I work in the environment, I made a little application in Lazarus that load text files to the SQLite database. The process was done well, until the moment that will close execute the command “commit”. I this moment the application crashes showing the message “Disk I/O Error”. During the execution, the journal file for database is created, and after the crash it is removed and the database file remains without any modifications. Searching in the Web, I found a note describing a workaround, that consist in change the pragma “jornal_mode” to value “truncate”. For my surprise, all my tries to change the value of pragma “journal_mode” don't work. I try change via SQL DDL script, via SQL Expert and via application. In all the cases, when I access the database after the changes, the values of pragma “journal_mode” it ever “delete”, not the value that I change. I try “truncate”, “memory”, etc, without any success. In resume, I have two problems 1)The “Disk I/O Error” when I try to commit the transaction (running in a Windows CE Emulator) 2)The change of value of pragma that don't work. Thanks in advance Horacio Pereira Belo Horizonte – MG – Brasil hora...@bysat.com.br ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users