で入力テキストなどのすべての行を取得します私はテキストボックスを持っていると私はすべての単語は、(例えば、aの)テキストボックスに文字で始まる検索したいテキストボックス
私は
"select * from tbl_search where Name like a% "
を使用する必要があります知っています
それは私がこのように書いたtextbox.for例の値のために仕事をdoesntの:
cmd = New SqlCommand("select * from tbl_search where Name like @value%") 'it gives the runtime error :"Incorrect syntax near '%'."
cmd.Parameters.AddWithValue("@value", TextBox1.Text)
おかげでこのdoesntの仕事、ランタイムエラー:「『値%@』無効な列名を」 – Arash
ああ、古い@値%の問題。それを逃した。 '' @value '+'% '"' – Polynomial
のような名前を@valueの周りに引用符で囲むことはできません。 – Ray