By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,657 Members | 1,029 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,657 IT Pros & Developers. It's quick & easy.

LIKE not working for Access Query in ASP.NET 2.0

P: n/a
I don't know if this is the best group to ask this question, so redirect me
if necessary. I have a valid query that uses the LIKE operator. I know it
is valid because it works directly in Access. I also know that my ASP code
is valid, because if I remove the LIKE operator, it works fine. Can anyone
tell me why the LIKE operator will not work for an Access database when sent
from ASP.NET 2.0?

Many thanks,
Tony
Oct 30 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I don't know if this is the best group to ask this question, so redirect me
if necessary. I have a valid query that uses the LIKE operator. I know it
is valid because it works directly in Access. I also know that my ASP code
is valid, because if I remove the LIKE operator, it works fine. Can anyone
tell me why the LIKE operator will not work for an Access database when sent
from ASP.NET 2.0?

Many thanks,
Tony
Exactly what "doesn't work"?
I think you use * and ? as wildcards. These are supported by Access
when used directly. When you use OleDb to send a query to Access, use
the standard SQL wildcards: % (instead of *) and _ (instead of ?).

Hans Kesting
Oct 30 '06 #2

P: n/a
"Hans Kesting" <ne***********@spamgourmet.comwrote in message
news:mn***********************@spamgourmet.com...
Exactly what "doesn't work"?
I think you use * and ? as wildcards. These are supported by Access when
used directly. When you use OleDb to send a query to Access, use the
standard SQL wildcards: % (instead of *) and _ (instead of ?).
Sorry I didn't describe the situation more. I receive no error message,
just an empty dataset.

Anyway, the wildcard situation did it for me, changing to %. Strange, it
will pass VBA functions straight through to Access/Jet, but not the
wildcards.

Anyway, thanks a million,
Tony
Oct 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.