title: System.Data.SqlClient.SqlException: "Invalid column name 'e'." | Error with Database
body: <p>Im using Database Data for my Project and when I type a letter in Textbox1, the application crashes with the error:</p>
  <p>System.Data.SqlClient.SqlException: &quot;Invalid column name 'e'.&quot;</p>
  <p>Database name is Table with &quot;Id&quot; and &quot;altitudes&quot;
  Id is a varchar and altitudes is a nchar.</p>
  <p>Thats how I want it to work:
  Typing a Name in name.Text, search for the name in the database and paste the assigned altitude in altitude.Text.
  Altitudes are numbers, Names are Letters in the database.</p>
  <p>Where's the error in my code? (Data Source is on purpose blank)</p>
  <pre><code>        {
              String source = @&quot;Data Source=&quot;;
              SqlConnection con = new SqlConnection(source);
              con.Open();
  
              String sqlSelectQuery = &quot;SELECT * FROM [Table] WHERE ID =&quot;+char.Parse(name.Text);
              SqlCommand cmd = new SqlCommand(sqlSelectQuery, con);
              SqlDataReader dr = cmd.ExecuteReader();
              if (dr.Read())
              {
                  altitude.Text = (dr[&quot;altitudes&quot;].ToString());
              }
              con.Close();
          }
  </code></pre>