Link to home
Start Free TrialLog in
Avatar of Karolina Sanovic
Karolina Sanovic

asked on

Cannot interpret token '"' at position 10.

Hi,
I have error at my search code.I have column name with two words "košnica br" and that is probblem in my writting code I try one code but I have error please help
error--at-position-10.png
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

try:

Me.SolinaBindingSource.Filter = "kosnica = '" & txtSearch.Text & "'"

and beware of search text which may contain single quotes and it may cause an error for you. which you need to fix that by double the single quotes for escape.
ASKER CERTIFIED SOLUTION
Avatar of Randy Poole
Randy Poole
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or (alter as required)
Me.SolinaBindingSource.Filter = string.Format("košnica = '{0}'",txtSearch.Text);
Me.SolinaBindingSource.Filter = string.Format("[košnica br]= '{0}'",txtSearch.Text);
...

Open in new window