Searching a DB from the URL

Results 1 to 3 of 3

Thread: Searching a DB from the URL

  1. #1
    Christopher_P Guest

    Default Searching a DB from the URL

    Firstly well done to the guys who wrote this site! You&#039;ve taught me so much in the last day :)<BR><BR>Anyway... I can happily connect to my Access DB, and select records using the SQL WHERE clause. However I would like to enter, for example, into the address bar, and only records with 1 in the ID field would be displayed.<BR><BR>I tried...<BR>objRS.Open "SELECT ID, ArticleName, ArticleHTML FROM Articles WHERE ID = " & ID, objConn<BR>...but it didn&#039;t work (Syntax error (missing operator) in query expression &#039;ID =&#039;.)<BR><BR>Can anybody point me in the right direction?<BR><BR>Many thanks,<BR>Christopher Paton

  2. #2
    NPKumar Guest

    Default RE: Searching a DB from the URL

    Chnage your query to the following:<BR>"Select ID,ArticleName,ArticleHTML from Articles where ID="&Request.querystring("ID") ,objConn

  3. #3
    Christopher_P Guest

    Default RE: Searching a DB from the URL

    Many thanks for that.<BR><BR>I&#039;d actually just done a search for learning how to sort databases and I bumped into QueryString on my own.<BR><BR>Thanks again anyway!

Posting Permissions

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