Hi experts
I m using Hindi font In a text box,
these textbox has a value "uxn ¼dS'k½",
when I use select command for searching "uxn ¼dS'k½" value,
it's show error.
I know this error is showing for ' which is in "uxn ¼dS'k½" , how to search m I

can you please elaborate the last line of your question

Parameterized query will solve your problem.

cn=new SqlConnection("connection_string")
cmd=new SqlCommand("select * from table1 where col1=@col1",cn)
cmd.Parameter.AddWithValue("@col1",textbox1.text")
....
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.