title: OLEDB SQL Syntax Error, I can't see it
body: <p>I am trying to send a new user on my C# program to the database (MSAccess in this case). I create the string as follows...</p>
  
  <pre><code>String StrCmd = String.Format("INSERT INTO tbl_Users (Username, Password, IsAdmin) VALUES ('{0}', '{1}', {2});", Username, passwordHash, AdminPower);
  </code></pre>
  
  <p>This creates an SQL string, for example...</p>
  
  <pre><code>INSERT INTO tbl_Users (Username, Password, IsAdmin) 
  VALUES ('TestUser', '1013638657', False);
  </code></pre>
  
  <p>This works fine if I paste it into a Query in MSAccess, but in the code I keep getting a <code>Syntax error in INSERT INTO statement.</code> error.</p>
  
  <p>Can anyone see something obvious I am missing?</p>
  
  <p>Additional Information:</p>
  
  <p><code>Username</code> and <code>passwordHash</code> are Strings, <code>AdminPower</code> is a Boolean.</p>
  
  <p><code>Username</code> and <code>Password</code> are Text Fields, <code>IsAdmin</code> is a Yes/No Field.</p>
  
  <p>Code Block of interest...</p>
  
  <pre><code>OleDbConnection MyConn = new OleDbConnection(Program.ConnStr);
  MyConn.Open();
  String StrCmd = String.Format("INSERT INTO tbl_Users (Username, Password, IsAdmin) VALUES ('{0}', '{1}', {2});", Username, passwordHash, AdminPower);
  OleDbCommand Cmd = new OleDbCommand(StrCmd, MyConn);
  Cmd.ExecuteNonQuery();
  MyConn.Close();
  </code></pre>