RE: SQL Help required

by "Shull, Conrad" <cshull(at)shscares.org>

 Date:  Wed, 15 Mar 2000 08:35:26 -0500
 To:  "'hwg-languages(at)hwg.org'" <hwg-languages(at)hwg.org>
  todo: View Thread, Original
Keep in mind that if your data "empID" is a numeric type, it will not match
your Request.Form("id") datatype, which is sent by your form as a string
(text) datatype.  I would change it to match (if necessary) thusly:
Csng(Request.Form("id")) or Clng((Request.Form("id")) 


__________________________________
Conrad Shull
Information Technology Associate
Learning Resources Center
Susquehanna Health System
www.shscares.org
cshull(at)shscares.org
webmaster(at)shscares.org
570.321.2266

> -----Original Message-----
> From: Ken Richardson [mailto:krichardson(at)escape.ca]
> Sent: Tuesday, March 14, 2000 6:03 PM
> To: HWG Languages
> 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

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.