Re: SQL Help required

by gflowers(at)micron.net

 Date:  Tue, 14 Mar 2000 17:51:40 -0700
 To:  "Ken Richardson" <krichardson(at)escape.ca>
 Cc:  "HWG Languages" <hwg-languages(at)hwg.org>
  todo: View Thread, Original
Try changing

   sql ="Select empID, empPW FROM EmpPasswords"&_
   " WHERE empID =" & Request.Form("id")

to

   sql ="Select empID, empPW FROM EmpPasswords"&_
   " WHERE empID ='" & Request.Form("id") & "'"

Gary

----- Original Message -----
From: "Ken Richardson" <krichardson(at)escape.ca>
Date: Tuesday, March 14, 2000 4:03 pm
Subject: SQL Help required

> I can't seem to figure out what is wrong with this.
> 
> <%
> Set datacon = Server.CreateObject("ADODB.Connection")
> datacon.Open "Password"
> 
> sql ="Select empID, empPW FROM EmpPasswords"&_
> " WHERE empID =" & Request.Form("id")
> 
> Set RecordSet = datacon.Execute(sql)
> %>
> 
> Produces the following error message
> 
> Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
> 
> [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
> Expected 1.
> /ASP/testASP/Ex5_1_verify.asp, line 17
> 
> I know that id is coming in from the form on the preceding page as 
> I have
> been able to access it to print on the page.
> 
> Any suggestions.
> TIA
> Ken
> 
> 
> 

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA