I am trying to upgrade from a http://sqlite.phxsoftware.com/ version (1.0.66) to the new 1.0.76 in x64 bits machine with Windows 7.
I can create the connection:
using (SQLiteConnection conn = new SQLiteconnection(myConnString)) {
conn.Open(); <<---- here the error.
}
If I do not copy 'SQLite.Interop.dll' to the app.folder I get an error 'cannot find DLL' and (Excepción de HRESULT: 0x8007007E) (all of this in my localization).
If I copy 'SQLite.Interop.dll' to the app folder the I get this exception:
System.BadImageFormatException was unhandled
Message=Se ha intentado cargar un programa con un formato incorrecto. (Excepción de HRESULT: 0x8007000B)
Source=System.Data.SQLite
StackTrace:
en System.Data.SQLite.UnsafeNativeMethods.sqlite3_open_interop(Byte[] utf8Filename, Int32 flags, IntPtr& db)
en System.Data.SQLite.SQLite3.Open(String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool)
en System.Data.SQLite.SQLiteConnection.Open()
en ........................................
....................................
Where is my problem ?
Thanks.
<hr /><i>anonymous added on 2011-10-24 15:06:36 UTC:</i><br />
It is solved.
We are generating our application for x86. Download and install x86 Setup NET 4 version and all is working fine now.
But is 'SQLite.Interop.dll' really neccesary ? Will I have to distribute it with my application ?
I have read in somewhere only 'System.Data.SQLite.dll' was required.
Thanks.
<hr /><i>mistachkin added on 2011-10-25 11:08:50 UTC:</i><br />
You might want to download the following package, where the System.Data.SQLite.dll contains all the native and managed code necessary:
<a href="http://system.data.sqlite.org/sqlite-netFx40-binary-bundle-x64-2010-1.0.76.0.zip">Precompiled Binaries for 64-bit Windows (.NET Framework 4.0)</a>
Alternatively, if you want the MSVC runtime to be statically linked as well, you can use:
<a href="http://system.data.sqlite.org/sqlite-netFx40-static-binary-bundle-x64-2010-1.0.76.0.zip">Precompiled Statically-Linked Binaries for 64-bit Windows (.NET Framework 4.0)</a>
|