Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Keyword Search with ASP of Access DB

Posted 17 May 2002 19:18:23
1
has voted
17 May 2002 19:18:23 Tuan Hoang posted:
I currently have a single Access DB table and would like to be able to do a keyword search of all the fields and display those records that have that keyword in it. Could someone be so kind to explain how I could start going about doing this? I've looked at the TDSFTutorial tutorial, but that is more than what I need. I just would like to put in a some keywords in one text field to search through one DB Table. Any help would be much appreciated. Thank you.

Replies

Replied 20 May 2002 19:24:44
20 May 2002 19:24:44 David Thomas replied:
I dont think this is has hard as it seems..

i don't know how to do it with "all fields" but you could add a field called "keywords" with all your relevant words in and just search that no problem.

Your search textbox is called "SearchUs" for example,, you set the action for the form to "results.asp" or something similiar.

Edit Results.asp to filter the records on the field "keywords", set as a "Form Variable" to "contain" and finally set the form variable as "SearchUs" (the name of your search box from the first page). This can all be done in the "Simple Recordset" dialogue box.

And i'm sure that one of the more experienced guys can tell you how to do it better, this is just a qucker and easier way.
Hope it helps

"Nobody ever said this stuff was easy"
Replied 28 May 2002 18:57:45
28 May 2002 18:57:45 Tuan Hoang replied:
Thanks for giving me a starting point DavieT. What I ended up doing was this.
I created a query in Access that listed all the Fields plus the addition of a field that combined the fields that I wanted the search to look through. In my results.asp page I did write the SQL that would filter for the "keyword" from the combined field.

Edited by - guano989 on 28 May 2002 18:58:05

Reply to this topic