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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing SQL from Webpage to Access DB using LIKE

Status
Not open for further replies.

nettechie

Technical User
May 25, 2001
1
US
Hello,

I have a MS Access DB on an Win 2000 Server running IIS. I connect to the DB using Javascript (asp pages). Up to this point I have had no problem retrieving data, however, I am trying to create broader searches now and I am running into major problems.

I want to retrieve records that contain a particular work, say "Remove", in any field. I thought this would work with LIKE, but it doesn't. I even used Access to create the SQL statement and it works fine in Access, but if I pass it to Access over the webpage it will only display records if I give it the exact phrase written in any particular field. Any ideas? Here is the SQL statement:

"SELECT * FROM userinfo WHERE (((userinfo.ShortDescript) Like '*Remove*)) OR (((userinfo.FName) Like 'Bob*')) OR (((userinfo.LName) Like 'Bob*'))"

Any help would be greatly appreciated. Thanks!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top