Simple search help

Results 1 to 2 of 2

Thread: Simple search help

  1. #1
    Join Date
    Dec 1969

    Default Simple search help

    Hello I am try to search a small database with ASP. I want to be able to search for words in from the feilds, there are 5 feilds and they are ID (auto) Sermon_date,sersom_title,sermon_body and writer.<BR><BR>I tired using the like function but could not get it to work for me. Any help would be great or maybe tell me were I can find a simple one.<BR><BR>Thanks for you help in this for me<BR><BR>Stephen

  2. #2
    Join Date
    Dec 1969

    Default suggestions..

    This is just a suggestion and an idea and a starting point.<BR><BR>i used the following method to search access tables for strings.<BR><BR>Let&#039s say the key words are<BR>Keyword1 = "x1"<BR>KeyWord2 = "x2"<BR>&#039let&#039s put to gether a query for searching 3 &#039fields:title,writer,body<BR><BR>Sql1 = "Select * from table1 where ucase(trim(title))=&#039" & keyword1 & "&#039 Or ucase(trim(writer)) =&#039" & Keyword1 & &#039" Or ucase(trim(body))=&#039" & keyword1 & "&#039 Or ucase(trim(title))=&#039" & keyword2 & "&#039 Or ucase(trim(writer)) =&#039" & Keyword2 & &#039" Or ucase(trim(body))=&#039" & keyword2 & "&#039 Order by somefield<BR><BR>&#039make recordset and display fields<BR><BR>&#039this is just a sample. See if u can use substring function.<BR><BR>i have used the same method to search 10 tables for a given keyword.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts