Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No results when using "LIKE"

Status
Not open for further replies.

gwrman

IS-IT--Management
Dec 20, 2005
94
CA
I have a DB that I am trying to wrtie a VBscript search code for.

Basically, no records get returned, even when I put in a term that I KNOW is in there.

It DOES when I use "=" but when I use "LIKE" i get no results.

Is there something I must do with the DB (setting?), or with the cursor in my vbscript code to get this to work?
 
Could you give us some more specific details, such as example code, and example data?

~Melagan
______
"It's never too late to become what you might have been.
 
to use the LIKE operator:

LIKE "AB*" - finds all instance where the field begins with AB
LIKE "*AB" - where the field ends with AB
LIKE "*AB*" - where the field contains AB anywhere

is that how you are using it?


Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Another possibility is that you're using ADO instead of DAO so the wildcard character needs to be "%" rather than "*".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top