Hi
I have a textbox where my user can make a search by the first_name. When the user click on the search button, it display the result in a datagrid.
My problem is when the user enter a first name with a ' in it. It cause me this error: the 'dd' text is the text after the '
An unhandled exception of type 'System.Data.SyntaxErrorException' occurred in system.data.dll
Additional information: Syntax error: Missing operand after 'dd' operator.
Here is the code that cause me this error:
dv.RowFilter() = "First_Name = '" + Me.TextBox16.Text + "'"
Does anybody know a clean way to solve this problem?
Thanks in advance
Rsx02
I have a textbox where my user can make a search by the first_name. When the user click on the search button, it display the result in a datagrid.
My problem is when the user enter a first name with a ' in it. It cause me this error: the 'dd' text is the text after the '
An unhandled exception of type 'System.Data.SyntaxErrorException' occurred in system.data.dll
Additional information: Syntax error: Missing operand after 'dd' operator.
Here is the code that cause me this error:
dv.RowFilter() = "First_Name = '" + Me.TextBox16.Text + "'"
Does anybody know a clean way to solve this problem?
Thanks in advance
Rsx02