title: System.Data.SqlClient.SqlException: 'Incorrect syntax near 'USERNAME'.'
body: <p>I'm trying to make a login and I keep getting this error:</p>
  
  <blockquote>
    <p>System.Data.SqlClient.SqlException: 'Incorrect syntax near 'USERNAME'.'</p>
  </blockquote>
  
  <p>Here is my code </p>
  
  <pre><code>SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Omar\Documents\Data.mdf;Integrated Security=True;Connect Timeout=30");
  SqlDataAdapter sda = new SqlDataAdapter("Select Count(*)  From [LOGIN] were USERNAME ='" + textBox1.Text +"' and PASSWORD='"+ textBox2.Text +"'",con);
  DataTable dt = new DataTable();
  
  sda.Fill(dt);
  </code></pre>