title: Monitor SQLite database
body: <p>I am trying to write something to monitor an SQLite database using the Update handler. Here are the relevant bits of my code so far ...</p>
  
  <pre><code>    public void Run()
      {
          var connectionString = ConfigurationManager.ConnectionStrings["SqliteConnection"].ConnectionString;
          _connection = new SQLiteConnection(connectionString);
          _connection.Open();
          _connection.Update += ConnectionUpdate;
          _connection.Commit += ConnectionCommit;
      }
  
      void ConnectionCommit(object sender, CommitEventArgs e)
      {
          Console.WriteLine("COMMIT");
      }
  
      public void Stop()
      {
          _connection.Update -= ConnectionUpdate;
          _connection.Close();
      }
  
      void ConnectionUpdate(object sender, UpdateEventArgs e)
      {
          Console.WriteLine("UPDATE");
  
      }
  </code></pre>
  
  <p>My connection string is as follows ....</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;connectionStrings&gt;
      &lt;add name="SqliteConnection" connectionString="Data Source=C:\Dev\Databases\movingpictures.s3db;Version=3;" /&gt;
    &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>This is part of a simple proof-of-concept console application.</p>
  
  <p>Have I missed something obvious in my setup of the database connection?</p>