Re: [sqlite] SQLite for WinCE
I have successfully compiled the source code, created a simple test application, and deployed to my device. When I attempt to execute the line below I receive an error message: System.Data.SQLite.SQLiteConnection connection= new System.Data.SQLite.SQLiteConnection(); The error is as follows: System.TypeLoadException was unhandled Message="Could not load type 'System.Data.SQLite.SQLiteConnection' from assembly 'System.Data.SQLite, Version=1.0.82.0, Culture=neutral, PublicKeyToken=1FDB50B1B62B4C84'." StackTrace: at System.Windows.Forms.Control.OnClick() at System.Windows.Forms.Button.OnClick() at System.Windows.Forms.ButtonBase.WnProc() at System.Windows.Forms.Control._InternalWnProc() at Microsoft.AGL.Forms.EVL.EnterMainLoop() at System.Windows.Forms.Application.Run() at ManagedFramework.Windows.Forms.Manager.Run() at ManagedFramework.Program.runGUI() at ManagedFramework.Program.Main() InnerException: I do have the System.Data.SQLite.dll assembly referenced. Also, how can I check to if this is being compiled for .NET Compact Framework 2.0 ? And I've noticed that there's a "System.Transactions" reference in the System.Data.SQLite.Compact.2008 project but the project compiles without error. Should I remove the reference? Thanks again, Brian Wheatley ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite for WinCE
Brian Wheatley wrote: > > After compiling there's a SQLite.Interop.082.dll file in the folder > labeled "Pocket PC2003 (ARMV4)". > Yes, that contains the native code for SQLite, compiled for Windows CE. > > Do I need to change the solution platform to the appropriate device > before compiling? Or just leave it at mixed? > Leaving it mixed is fine. The only processor architecture supported by the Windows CE project is ARM. > > Also, there's no Interop file in the Win32 debug folder. When I try > to run a PC application using the System.Data.SQLite.dll in the > bin\2008\Debug\bin folder it throws an exception that SQLite.Interop.dll > could not be found. > The SQLite.Interop.dll file is only copied by the build process if the selected processor architecture matches that of the machine performing the build. You might need to build the x64 SQLite.Interop.dll (by selecting x64 as the platform) and then manually copy the resulting DLL to the directory containing the managed components. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite for WinCE
Hello, I've downloaded the source code for 1.0.82.0 of System.Data.SQLite and everything compiles without error (thankfully). After compiling there's a SQLite.Interop.082.dll file in the folder labeled "Pocket PC2003 (ARMV4)". Do I need to change the solution platform to the appropriate device before compiling? Or just leave it at mixed? Also, there's no Interop file in the Win32 debug folder. When I try to run a PC application using the System.Data.SQLite.dll in the bin\2008\Debug\bin folder it throws an exception that SQLite.Interop.dll could not be found. Thank you, Brian Wheatley From: Joe Mistachkin <sql...@mistachkin.com> To: 'General Discussion of SQLite Database' <sqlite-users@sqlite.org> Sent: Saturday, November 24, 2012 4:00 PM Subject: Re: [sqlite] SQLite for WinCE Brian Wheatley wrote: > > What I would like to know is: can SQLite be used in applications written > using the .NET Compact Framework 2.0 on a Windows Embedded CE 6.0 device? > Yes, SQLite is supported on Windows CE and System.Data.SQLite helps support the .NET Compact Framework 2.0. > > If so, what steps are necessary? > 1. Get the "PocketPC" binaries (or source code) for System.Data.SQLite, from: https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki 2. Extract (or copy) the binaries into a directory like "Externals" inside your project. 3. Add a reference to the System.Data.SQLite assembly. 4. Make sure that the SQLite.Interop.0XX.dll gets copied to the build output and deployment directories. > > Does the source code amalgamation need to be recompiled? > The necessary project files are included with System.Data.SQLite. -- Joe Mistachkin ___ 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 for WinCE
Brian Wheatley wrote: > > What I would like to know is: can SQLite be used in applications written > using the .NET Compact Framework 2.0 on a Windows Embedded CE 6.0 device? > Yes, SQLite is supported on Windows CE and System.Data.SQLite helps support the .NET Compact Framework 2.0. > > If so, what steps are necessary? > 1. Get the "PocketPC" binaries (or source code) for System.Data.SQLite, from: https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki 2. Extract (or copy) the binaries into a directory like "Externals" inside your project. 3. Add a reference to the System.Data.SQLite assembly. 4. Make sure that the SQLite.Interop.0XX.dll gets copied to the build output and deployment directories. > > Does the source code amalgamation need to be recompiled? > The necessary project files are included with System.Data.SQLite. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite for WinCE
Hello, I'm evaluating the SQLite database for future development projects. What I would like to know is: can SQLite be used in applications written using the .NET Compact Framework 2.0 on a Windows Embedded CE 6.0 device? If so, what steps are necessary? Does the source code amalgamation need to be recompiled? And what about System.Data.SQLite? Thanks in advance, Brian Wheatley ___ 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 Err or and change of pragma don´t work
Thank you Shane Thanks also to Jay A. Kreibich and Simon Slavin Happy new year Horacio Pereira -Mensagem Original- From: Shane Harrelson Sent: Wednesday, December 08, 2010 11:32 AM To: General Discussion of SQLite Database Subject: 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 Pereira <horac...@bysat.com.br> wrote: > 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 ___ 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
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
[sqlite] SQLite in WinCE Emulator - Disk I/O Er ror 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
Re: [sqlite] SQLite in WinCE Emulator - Disk I/O Erro r and change of pragma don´t work
On 7 Dec 2010, at 8:08pm, Horacio Rabelo Pereira wrote: > 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. it is important that the journal file is /not/ removed by anything except SQLite. In the journal file is stored information used when SQLite makes contact with the database again. Removing the journal file can lead to a corrupt database. Simon. ___ 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