title: SQLite trigger with user-defined function
body: <p>I'm trying to create a SQLite trigger to call a function in C#. The function should be called after updating one of the columns in the table.</p>
  
  <p><strong>The function is defined as follows:</strong></p>
  
  <pre><code>public class TestingFunction&lt;T1&gt; : SQLiteScalarFunction&lt;T1, string&gt;
  {
       public TestingFunction() : base("testing") { }
  
       protected override string Execute(T1 arg1, SQLiteConnection connection)
       {
           //.. do some work
       }
  }
  </code></pre>
  
  <p><strong>and registered:</strong></p>
  
  <pre><code>SQLiteConnection sqLiteConnection = new SQLiteConnection(@"Data Source=" + settings.db_source);
  sqLiteConnection.Open();
  TestingFunction&lt;string&gt; function = new TestingFunction&lt;string&gt;();
  sqLiteConnection.RegisterFunction(function);
  </code></pre>
  
  <p><strong>The trigger:</strong></p>
  
  <pre><code>create trigger trigger1 update of act_cost on tunnels
  begin
     select testing(db_source);
  end;
  </code></pre>
  
  <p>When updating the table, I'm getting SQLite error: <code>no such function: testing.</code></p>
  
  <p>Any suggestions on what the problem might be?</p>