Re: [sqlite] Compiling with VS 2010 (force foreign key constraints)

2012-04-07 Thread Matjaž Cof
OK, i am getting somewhere. I try to use SQLite with custom compiles dll (System.Data.SQLite, System.Data.SQLite.Linq, SQLite.Interop) and it works. No error, which is a huge think for me. But for foregein key ID i can add anythink i want also ID that is not in reference table. I did edit SQLite.In

Re: [sqlite] Compiling with VS 2010 (force foreign key constraints)

2012-04-06 Thread Joe Mistachkin
Matjaž Cof wrote: > > Thank's to all. > Stupid me. But still not working. Is there any documentation how to compile > SQLite.NET.2010 solution with SQLITE_DEFAULT_FOREIGN_KEYS=1. > This would require modifying the Visual Studio properties file for the correct version of Visual Studio (2010 in y

Re: [sqlite] Compiling with VS 2010 (force foreign key constraints)

2012-04-06 Thread Matjaž Cof
Thank's to all. Stupid me. But still not working. Is there any documentation how to compile SQLite.NET.2010 solution with SQLITE_DEFAULT_FOREIGN_KEYS=1. I think, that the problem is, that i am using precompiled SQLite.Interop.dll (which is compiled without SQLITE_DEFAULT_FOREIGN_KEYS=1 - i think -

Re: [sqlite] Compiling with VS 2010 (force foreign key constraints)

2012-04-06 Thread Joe Mistachkin
Matjaž Cof wrote: > > I am running the latest version. (Just starting to use SQLite and really > like it). > Like i sad, i don't want to write sql every time i connec't to database. > And i use EntityFramework, witch means that ObjectContext doesn't have any > ExecuteSql method and because of tha

Re: [sqlite] Compiling with VS 2010 (force foreign key constraints)

2012-04-06 Thread Matjaž Cof
I am running the latest version. (Just starting to use SQLite and really like it). Like i sad, i don't want to write sql every time i connec't to database. And i use EntityFramework, witch means that ObjectContext doesn't have any ExecuteSql method and because of that, i try to recompile with SQLIT

Re: [sqlite] Compiling with VS 2010 (force foreign key constraints)

2012-04-06 Thread Simon Slavin
On 6 Apr 2012, at 1:50pm, Matjaž Cof wrote: > But here is the problem. For foregein key i can insert any value even if > inserted ID not exist in reference table. See this page You must be running at least 3.6.19. And you must have PRAGMA foreign_keys =

Re: [sqlite] Compiling with VS 2010 (force foreign key constraints)

2012-04-06 Thread Matjaž Cof
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

Re: [sqlite] Compiling with VS 2010 (force foreign key constraints)

2012-04-05 Thread Joe Mistachkin
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 prep

[sqlite] Compiling with VS 2010 (force foreign key constraints)

2012-04-05 Thread Matjaž Cof
I am trying something, and i am confused as far as i can be. I only want that SQlite would enforce foreign key constraint by default. I don't want to use PRAGMA foreign_keys every time i mada a connection. After searching on net, i found that i can compile with SQLITE_DEFAULT_FOREIGN_KEYS. I downlo