Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll

my Blog
[prev. Lesson]  DBFAQ: User Entered ' in field
     [next Lesson]  DBFAQ: retrieving MEMO/BLOBs generates error

FAQ #3: I have a query utilizing LIKE that works great in Access but produces an error in ASP.

This is a very common error message when querying databases and the person learned to query in Access. Access uses * for multiple character wildcards and ? for individual character wildcards.

Access ASP/ADO
* %
? _

Let us look at 2 typical Access Query statements:

SELECT * from customer where city LIKE "N*"
works fine in Access!  produces an error in ASP.

SELECT * from customer where city LIKE "N%"
works fine in ASP.

SELECT * from customer where phrase LIKE "N?w"
works fine in Access!  produces an error in ASP.

SELECT * from customer where phrase LIKE "N_w"
works fine in ASP.

There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too. a $5 tip buys him lunch at McDonalds, a $20 tip buys his kid Hitoshi a new computer game, a $39 tip buys his daughter Michiko a few nice outfits. See our donor list.