Database Keyword Search

  • Thread starter redant via AccessMonster.com
  • Start date
R

redant via AccessMonster.com

I created a keyword search in Dreamweaver that searches the title only of a
list of courses. I can type in an exact phrase or part of a word and that
works good. Now I have to be able to type in two non adjacent words that may
be in a course title. ANy idea on how to get started or where? Thank you.

<%
Dim rsKeySearchCourses__MMColParam
rsKeySearchCourses__MMColParam = "1"
If (Request.QueryString("txtKeywords") <> "") Then
rsKeySearchCourses__MMColParam = Request.QueryString("txtKeywords")
End If
%>
<%
Dim rsKeySearchCourses
Dim rsKeySearchCourses_cmd
Dim rsKeySearchCourses_numRows

Set rsKeySearchCourses_cmd = Server.CreateObject ("ADODB.Command")
rsKeySearchCourses_cmd.ActiveConnection = MM_cnnTrainingWebsite_STRING
rsKeySearchCourses_cmd.CommandText = "SELECT * FROM AllCourses WHERE Title
LIKE ? ORDER BY Title ASC"
rsKeySearchCourses_cmd.Prepared = true
rsKeySearchCourses_cmd.Parameters.Append rsKeySearchCourses_cmd.
CreateParameter("param1", 200, 1, 255, "%" + rsKeySearchCourses__MMColParam +
"%") ' adVarChar

Set rsKeySearchCourses = rsKeySearchCourses_cmd.Execute
rsKeySearchCourses_numRows = 0
%>
 
J

Jeff Boyce

Not clear how this is a Microsoft Access-related question...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
R

redant via AccessMonster.com

Well maybe it's a VB question. I need to search my MS Access DB using a web
form.

Jeff said:
Not clear how this is a Microsoft Access-related question...

Regards

Jeff Boyce
Microsoft Office/Access MVP
I created a keyword search in Dreamweaver that searches the title only of a
list of courses. I can type in an exact phrase or part of a word and that
[quoted text clipped - 27 lines]
rsKeySearchCourses_numRows = 0
%>
 
J

Jeff Boyce

One approach might be to use Access to develop the 'bones' of the SQL you'd
use ... open a new query, design the query, switch to SQL view and
copy/paste.

But if you are using something other than the Access front-end, the exact
SQL syntax may vary...

Good luck

Regards

Jeff Boyce
Microsoft Office/Access MVP


redant via AccessMonster.com said:
Well maybe it's a VB question. I need to search my MS Access DB using a
web
form.

Jeff said:
Not clear how this is a Microsoft Access-related question...

Regards

Jeff Boyce
Microsoft Office/Access MVP
I created a keyword search in Dreamweaver that searches the title only of
a
list of courses. I can type in an exact phrase or part of a word and
that
[quoted text clipped - 27 lines]
rsKeySearchCourses_numRows = 0
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top