This is kind of the most annoying thing I've ever worked with. As I understand, when opening a new Query Window, a new connection is created, but in SQLite query window (I'm using Visual Studio integrated Designer for SQLite), it seems to be created every time you click Execute (a red !) button. And the PRAGMA foreign_keys = ON seems to take effect only in a session of connection (means that, after connection is closed, it turns to 0/OFF). If I'm wrong please explain to me why this happens:
-> First, I right-click on the SQLite [My database] (right under the Data Connections node in Server Explorer window in Visual Studio 2010) -> select New Query -> start typing PRAGMA foreign_keys -> shows result: 0 -> try turning it on by PRAGMA foreign_keys = ON -> check if it is ON by PRAGMA foreign_keys -> Still shows result: 0 =>>>> What???
That means I can't turn it on, and I can't benefit from Foreign Key Constraint to keep my data integral.
If foreign_keys is some attribute of a database or a table, it should be always ON/1 once I have turned it on. Therefore, I think that 'liquid' stuff is some attribute of Connection. Can't work with it.
Please help... Thanks!