Searching through a MS DB..

Results 1 to 3 of 3

Thread: Searching through a MS DB..

  1. #1
    Bart[GW] Guest

    Default Searching through a MS DB..

    Hello, I could not find any FAQ on this website on how to search through a microsoft Access Database, searching as in allowing a user to type in a title and it will search the database for that title. So, my question is can anyone point me in the direction of an article on how to do this? Or maybe post simple example here? Thanks!<BR><BR>----------------<BR>Check out all the amazing things I have accomplished with ASP at my website Gaming World - !

  2. #2
    p.r.g Guest

    Default RE: Searching through a MS DB..

    Hey,<BR><BR>If your looking to search just on text then its fairly simple.<BR>Make a page with a form and a text box input. Then have that form POST to a new page that will take the <BR>Request.Form("SearchField") and search the table for it.<BR><BR>This of course is a very simple example, I myself wouldn&#039;t be able to do much more than this... but anyhow...<BR><BR>Do something like this -<BR>Dim strSearch<BR>strSearch = Request.Form("search")<BR><BR>&#039; *** Have an open connection<BR>Dim sSQL, rs<BR><BR>sSQL = "SELECT outputcolumns FROM table WHERE columnname LIKE &#039;%" & strSearch & "%&#039; ORDER BY columnname<BR><BR>&#039; execute the statement and then make the html or script to display the results as you want them...<BR><BR>There are most likely way better ways to do this but thats a super simple way you can look through text columns and find matches.<BR><BR>Hope that helped slightly :)

  3. #3
    Bart[GW] Guest

    Default Thanks!

    Thanks for the help, I got it working!

Posting Permissions

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