System.Data.SQLite
View Ticket
Not logged in
Ticket UUID: bf7f825cea7d6edb65d49c5c67d16d12540288d9
Title: Attempt to load program with incorrect format
Status: Closed Type: Incident
Severity: Important Priority: Medium
Subsystem: Integration_Via_PInvoke Resolution: Mailing_List
Last Modified: 2019-01-22 23:16:14
Version Found In: 1.0.109.0
User Comments:
anonymous added on 2019-01-21 14:52:31: (text/x-fossil-plain)
I have VB.Net 2008 express installed on win7. I have downloaded the binaries for 32 bit system.data.sqlite.dll and sqlite.interop.dll. I add a reference for the system.data.sqllite.dll but I get an error indicating wrong format for the interop. I placed the interop in the \bin folder and tried this. It did not work. The error is
2019-01-21 09:38:10Z - db create error 
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
   at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
   at System.Data.SQLite.SQLite3.StaticIsInitialized() in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLite3.cs:line 3977
   at System.Data.SQLite.SQLiteLog.Initialize(String className) in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteLog.cs:line 186
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework) in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteConnection.cs:line 1795
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString) in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteConnection.cs:line 1710
   at System.Data.SQLite.SQLiteConnection..ctor() in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteConnection.cs:line 1700
   at Rural_Home_Soft_v1.SQLAccess.DBCreate() in C:\Users\User\Documents\Visual Studio 2008\Projects\RuralHomeSoftv3.0\SQLAccess.vb:line 290

I tried with X86 and ANY CPU. Same result. 

I have the same code working on an XP box with only version 1.0.65.0 and no interop file. Can anyone assist me please?

mistachkin added on 2019-01-22 23:16:14: (text/x-fossil-plain)
Please see question #12 in the FAQ:

[https://system.data.sqlite.org/index.html/doc/trunk/www/faq.wiki#q12]

If you still encounter problems, please ask this question on the mailing list:

[http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users]