Matjaž Cof wrote:
> 
> I recompiled it, add reference to System.Data.SQlite and
> System.Data.SQLite.Linq to my project and run. I get: The type
> initializer for 'System.Data.SQLite.SQLiteFactory' threw an exception.
> I try to add SQLite.Interop.Static.2010  SQLITE_DEFAULT_FOREIGN_KEYS
> in preprocessor definitions, still same problem.
> 

Without knowing what the thrown exception actually was, it's a bit hard to
diagnose your issue.  However, to further the discussion, I'm going to just
assume it was either DllNotFoundException or BadImageFormatException.

When using the System.Data.SQLite assemblies, it is very important to
understand where the native SQLite code will be loaded from (i.e. normally
the "SQLite.Interop.dll" file).  Also, the processor architecture for the
native
SQLite code [assembly] must match that of the machine running the code
(unless the application executable has been flagged as "32-bit only", which
is quite rare).

The "SQLite.Interop.dll" file must be located in the application binary
directory
or along the PATH and the processor architecture must be appropriate for the
application process.

--
Joe Mistachkin

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to