Query Access Database

Results 1 to 2 of 2

Thread: Query Access Database

  1. #1
    Join Date
    Dec 1969

    Default Query Access Database

    I am trying to submit a query to an Access Database. In the database, I have data with name, address, email address and password.<BR><BR>I want to make a query to the database stating that if I have the email address, give me the password.<BR><BR>This is what I have. tell me where I am wrong.<BR><BR>&#060;%<BR> dim rsItem, SQL<BR> set rsItem = Server.CreateObject("ADODB.Connection")<BR> rsItem.Open "webs24.database"<BR> SQL = "SELECT Password FROM person WHERE EMailAddress = &#039" & Request("Gimmie") & "&#039;"<BR>%&#062;<BR><BR>and how do I get the result to show? &#060;% Request ("Password") %&#062;?<BR><BR>Thanks,<BR>Chad<BR><BR>

  2. #2
    Sumithra Gopalan Guest

    Default RE: Query Access Database

    If I understand you correctly, you want to display the password corresponding to the email address that has been typed in by the client.<BR><BR>Try this,<BR>&#060;%m=Request.form("Gimmie")<BR>dim rsItem, SQL<BR>set rsItem = Server.CreateObject("ADODB.Connection")<BR>rsItem. Open "webs24.database"<BR>SQL = "SELECT Password FROM person WHERE EMailAddress = &#039" &m& "&#039"%&#062;<BR>&#060;%=rsItem("Password")%&#062 ;<BR><BR>HTH.

Posting Permissions

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