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
 
Back
Top