I figure it out, that ObjectListView "eat" error. I was missing SQLite.Interop.dll. I found it in prebuild ( http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki).
But here is the problem. For foregein key i can insert any value even if inserted ID not exist in reference table. I add the SQLITE_DEFAULT_FOREIGN_KEYS to the proprocessor definitions to both of SQLite.Interop.2010 and SQLite.Interop.Static.2010 projects. I expect, that build solution will give me the new SQLite.Interop.dll with SQLITE_DEFAULT_FOREIGN_KEYS. Am i incorrect? 2012/4/5 Joe Mistachkin <sql...@mistachkin.com> > > 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 > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users