title: SQLite cascading delete
body: <p>The parent table is:</p>
  <pre><code>CREATE TABLE BHEAD (
  ID INTEGER primary key asc,
  DESCR TEXT,
  LINECTR INT,
  UNITCTR INT)
  </code></pre>
  <p>The child table is:</p>
  <pre><code>CREATE TABLE BDET (
  ID INTEGER primary key asc,
  BID INTEGER,
  BCODE TEXT,
  QTY INTEGER,
  FOREIGN KEY (BID) REFERENCES BHEAD(ID) ON DELETE CASCADE
  )
  </code></pre>
  <p>I also execute the SQL <code>PRAGMA foreign_keys = ON;</code>.
  However, it does not work; when I delete one row from <code>BHEAD</code>, its associated rows in <code>BDET</code> are not gone...</p>
  <p>Why was that?</p>