RE: SQL Help required

by "Todd Philipps" <todd(at)anvil-group.com>

 Date:  Tue, 14 Mar 2000 15:50:59 -0800
 To:  "'Ken Richardson'" <krichardson(at)escape.ca>,
"'HWG Languages'" <hwg-languages(at)hwg.org>
 In-Reply-To:  gy5bs
  todo: View Thread, Original
You need to open a DSN.  ie.  "DSN=Password;UID=id;PWD=pass"

This DSN needs to be defined to the webserver tho.  I believe the error
message is saying that you need to define the UID and Password.

What database are you using?

Todd Philipps
Consumerinfo.com


-----Original Message-----
From: owner-hwg-languages(at)hwg.org [mailto:owner-hwg-languages(at)hwg.org]On
Behalf Of Ken Richardson
Sent: Tuesday, March 14, 2000 3: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