System. Data. SQLite is used in. Net CF (WM 6,ProgramAn exception occurs on some mobile phones (wm6.1 and 6.5). The error message is the unsafenativemethods. sqlite3_open_interop method. If you are using an earlier version of system. Data. SQLite, this exception may occur on mobile phones of wm6.1 or later versions.
In the version history of system. Data. SQLite, we found the following description:
1.0.50.0-June 27,200 8
code highlighting produced by actipro codehighlighter (freeware)
http://www.CodeHighlighter.com/
--> enhanced the mergebin utility to work around the strong name validation bug on the Compact framework. the old workaround kludged the DLL and caused wm6.1 to fail to load it. this new solution is permanent and no longer kludges the DLL.
I am using version 1.0.48, which includes the SQLite engine and ADO. Net encapsulation. The author merges them into a DLL file. This dll also supports native code or managed code calls. However, this method has been canceled in version 1.0.50. That is, ADO. net provider for SQLite and SQLite. InterOP are provided separately. Therefore, later versions of the system. data. SQLite. the DLL file is only an ADO. net provider for SQLite, which does not contain the source code of SQLite, while nativer is encapsulated in SQLite. interOP. xxx. DLL files. System. Data. SQLite. dll requires P/invoke SQLite. InterOP. XXX. dll.
After the new assembly is referenced, the above exception is not found.
In subsequent versions, the author provides the managedonly system. data. SQLite. DLL, which requires native sqlite3.dll or Linux shared library from http://www.sqlite.org for use, I can test in Asp.net but in.. Net cf. It seems that this managedonly should not support the ARM platform.
Tags: Windows Mobile,. Net CF, SQLite, system. Data. SQLite
Http://chy710.cnblogs.com