question

SaeidHamzehee avatar image
SaeidHamzehee asked

How Can I use Like parameter in where with Oledb to search in Access

I need to search some record in access with Like filtering, but it doesn't work with OleDBconnection and with access database. I used select * from Customer where Customer_Name Like '*" + Textbox1.text + "*'" I had experience with SQL database and Ado and SQLConnection for several time like this select * from Customer where Customer_Name Like '%" + Textbox1.text + "%'" and it worked without any problem, but with OleDBconnection and access database I have problem, Could I ask you help me in this regard. Thank you In advance
microsoft-access
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
dvroman avatar image
dvroman answered
The Wildcard in access is "*". Replace the "%" and it should work.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.