ok Joe that's a relief. Thanks for your help, much appreciated. -Jack -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin Sent: 22 July 2011 16:32 To: 'General Discussion of SQLite Database' Subject: Re: [sqlite] System.Data.Sqlite problem
Jack Hughes wrote: > > The 64 bit version works like a charm but the 32 bit version unfortunately does not. The error > message given by test.exe is given at the end of the message. The BadImageFormatException might > suggest a bad download... so I've re-downloaded a number of times and the result with the 32 bit > version is always the same. > This is the expected behavior, let me explain why. First off, I'm going to assume you downloaded the non-mixed-mode packages. They both include a native "SQLite.Interop.dll" (for the appropriate processor architecture) that contains the SQLite core. They also include a pure managed "System.Data.SQLite.dll" (marked as "pure IL" in the CLR header). When any .NET application marked as "pure IL" runs on 64-bit Windows, it will run as a 64-bit process. Similarly, if you run that exact same application on 32-bit Windows, it will run as a 32-bit process. A 64-bit process cannot load a 32-bit DLL. Therefore, the "test.exe" program starts as a 64-bit process and then attempts to load the 32-bit "SQLite.Interop.dll", which raises the BadImageFormatException. -- 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