title: sqlite exception no such column
body: <p>The following method should check if the record already exists in the table or no. But, I receive the syntax error "<strong>no such column</strong>". </p>
  
  <pre><code> public void ifExist(int myId)
   {
       string dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "ormdemo.db3");
       var db = new SQLiteConnection(dbPath);
       SQLiteCommand cmd = new SQLiteCommand(db);
       cmd.CommandText = "SELECT count(*) FROM storeConsumption WHERE Id = ?"+ myId;
  
       int count = Convert.ToInt32(cmd.ExecuteScalar&lt;storeConsumption&gt;());
       if (count == 0)
       {
           Console.WriteLine("The record is NOT Existed");    
       }
       else
       {
           Console.WriteLine("The record is Existed");
       }
   }      
  </code></pre>
  
  <p>Although, still there is the same error. I would be thankful if you have an idea that how can I solve it?</p>
  
  <p><strong>UPDATED:</strong>  I could resolve this problem like this:</p>
  
  <pre><code>public async Task&lt;Boolean&gt;  ifExist(int id){
  
      var result = await sdb.databaseConnection().ExecuteScalarAsync&lt;int&gt;("SELECT count(*) FROM storeConsumption WHERE Id = ?", id);
      Console.WriteLine(result);
      if (result &gt; 0) return true;
  
      return false;
  
  }
  </code></pre>