title: How To Find Input String In Database
body: <p>I want to find the text in textbox in my database. I wrote the code below. It finds numbers well, but when I want to find strings it gives a runtime error: <code>invalid column name for example aaa</code>, but aaa exists in column1 in my table.</p>
  
  <p>What do you think about the problem?</p>
  
  <pre><code>    cmd = New SqlCommand("select * from tbl where column1=" + TextBox1.Text)
      cmd.CommandType = CommandType.Text
      cmd.Connection = cnn
      dad.SelectCommand = cmd
      cmd.ExecuteNonQuery()
      dad.Fill(ds)
      dgv.DataSource = ds.Tables(0)
  </code></pre>