title: sqlite-net-pcl {SQLite.SQLiteException: near ")": syntax error
body: <p>I´m currently developing an iOS App with Xamarin and ran into a strange error with sqlite-net-pcl:</p>
  
  <pre><code>{SQLite.SQLiteException: near ")": syntax error   at SQLite.SQLite3.Prepare2 (SQLitePCL.sqlite3 db, System.String query) [0x0001e] in &lt;49ac49cfb94341128f6929b3ff2090ee&gt;:0    at SQLite.PreparedSqlLiteInsertCommand.Prepare () [0x00011] in &lt;49ac49cfb94341128f6929b…}
  </code></pre>
  
  <p>The error occours when I want to insert into a table of the following model:</p>
  
  <pre><code>public class PPPCount
  {
      public PPPCount()
      {
      }
  
      [PrimaryKey]
      public int Id { get; set; }
      public string PerpePartCount { get; set; }
  }
  </code></pre>
  
  <p>Here is the calling code:</p>
  
  <pre><code>try
  {
      var con = await DbFactory.Instance();
      var perpetrationPartCount = await 
          service.GetSumPerpetrationParts(immobilePerpetrationId);
  
      var dbModel = await con.FindAsync&lt;PPPCount&gt;(immobilePerpetrationId);
      if (dbModel == null)
      {
          var model = new PPPCount();
  
          model.Id = immobilePerpetrationId;
          model.PerpePartCount = perpetrationPartCount;
  
          //This causes the exception!!!!
          await con.InsertAsync(perpetrationPartCount);
      }
      else
      {
          if (dbModel.PerpePartCount != perpetrationPartCount)
          {
              dbModel.PerpePartCount = perpetrationPartCount;
              await con.UpdateAsync(dbModel);
          }
      }
      return perpetrationPartCount;
  }
  catch (Exception e)
  {
      //AlertHelper.ShowError(e.Message);
  }
  </code></pre>
  
  <p>The code of the DbFactory that creates and holds my sqlite connection object:</p>
  
  <pre><code>public class DbFactory
  {
      private static SQLiteAsyncConnection connection;
  
      public static async Task&lt;SQLiteAsyncConnection&gt; Instance()
      {
          if (connection == null)
          {
              bool deleteDb = false;
              string folder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
              var dbPath = System.IO.Path.Combine(folder, "..", "immotech_offline.db3");
  
              if (File.Exists(dbPath) &amp;&amp; deleteDb)
              {
                  File.Delete(dbPath);
              }
  
              connection = new SQLiteAsyncConnection(dbPath);
  
              try
              {
  
                  await connection.CreateTableAsync&lt;ImmobilePerpetration&gt;();
                  await connection.CreateTableAsync&lt;Customer&gt;();
                  await connection.CreateTableAsync&lt;PPPCount&gt;();
              }
              catch (Exception e)
              {
                  //TODO: Delete this part!
                  int i = 0;
              }
          }
  
          return connection;
      }
  }
  </code></pre>
  
  <p>The strange thing is I can work with the two other models without any problems!
  I really can´t explain what is causing this error and I tried to enable the tracing to show the SQL-Statements, but unfortunatelly the Async version of the sqlite connection object doesn´t provide a tracing.</p>
  
  <p>Then I tried the same code in synchronous version with tracing enabled and this is the result:</p>
  
  <pre><code>insert  into "Int32"() values ()
  </code></pre>
  
  <p>Well this is very clear why it isn´t working, but how can such a statement be generated? Did I missed something or it is a bug?</p>
  
  <p>UPDATE: Yes I used the search function and no case fits for my problem.</p>