title: SQLite Select...Where statement "no such column" error
body: <p>I have the following SQLite statement:</p>
  
  <pre><code>"SELECT * FROM HISTORICALPICKS WHERE BETTYPE = " + betType.ToString().ToUpper() + " ORDER BY DATETIME ASC"
  </code></pre>
  
  <p>And betType.ToString().ToUpper() is the string "ATS"</p>
  
  <p>For some reason I get the following error:</p>
  
  <pre><code>System.Data.SQLite.SQLiteException : SQL logic error or missing database
  no such column: ATS
  </code></pre>
  
  <p>...which leaves me baffled. ATS is not a column. BETTYPE is the column. I want it to select rows that have "ATS" in the BETTYPE column. </p>
  
  <p>My hunch is that something is wrong with the syntax. Here is a picture showing the table name and column name, along with a highlight of the value ATS:</p>
  
  <p><a href="https://i.stack.imgur.com/al3xd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/al3xd.png" alt="enter image description here"></a></p>