Query Builder

  • Thread starter Thread starter Michael Chong
  • Start date Start date
M

Michael Chong

Regarding Query Builder from OleDbCommand, it seems doesn't work well with
SQL syntax "ColName LIKE 'abc'", is that right? My SQL syntax works
perfectly in my database testing but it doesn't work at all in aspx.

Please advice! TQ

Michael.
 
Michael said:
Regarding Query Builder from OleDbCommand, it seems doesn't work well
with SQL syntax "ColName LIKE 'abc'", is that right? My SQL syntax
works perfectly in my database testing but it doesn't work at all in
aspx.
Please advice! TQ

Michael.

You are using OleDb to connect to Access, right?
Access uses a special dialect of sql. The "like" accepts "*" as a wildcard.
However, when you work through the general OleDb interface, you need to
use the standard syntax of "%". The interface will translate this into the
Access-specific "*".

(By the way: Access-"?" is SQL-"_")

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top