title: Enabling Foreign key constraints in SQLite
body: <p>I'm using SQLite with C# and have some tables with foreign keys defined. </p>
  
  <p>Now, I know that by default foreign key constraints are not enforced in SQLite, but I'd like to turn them ON.</p>
  
  <p>Is it possible to do this through code? I have looked up a related <a href="https://stackoverflow.com/questions/1124424/foreign-key-definition-in-sqlite">question</a>, but I'm not sure how to do it through C# code. I'm using the latest plug-in of SQLite available for Visual Studio 2008 for designing my tables. </p>
  
  <pre><code>conn.Open();
  SQLiteCommand cmd = new SQLiteCommand("PRAGMA foreign_keys = ON", conn);
  cmd.ExecuteNonQuery(); 
  conn.Close();
  </code></pre>
  
  <p>I need this change to persist when this connection is reopened. Is it possible?</p>