Validate logins with ASP, MS Access and Cookies error



Hi, while trying to validate username and password on login form I am
presented with the following error message


Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

/vdateUsr.asp, line 53

The 2 fields within the database are text fields (UID) and (PWD) these are
spelt correctly!

This is the code that I am using:

<%@Language=VBScript%>

<!-- METADATA TYPE="typelib"
FILE="C:\Program Files\Common
Files\System\ado\msado15.dll" -->
<!-- #include file="Connectionstring.asp" -->


<%
' /////////////////////////////////////
' login validation script
' © Matt Millross
' www.designplace.org
' free for use as long as copyright notice left intact
' For more scripts, visit www.designplace.org
' /////////////////////////////////////

' variables
dim cnStr
dim rcSet
dim frmUsername
dim frmPassword
dim sqlStr

'store form input into variables
frmUsername = Request.Form("UID")
frmPassword = Request.Form("PWD")

'create connection and recordset objects
Set cnStr = Server.CreateObject("ADODB.Connection")
Set rcSet = Server.CreateObject("ADODB.Recordset")

' defining database connection (connectionstring.asp)
cnStr.ConnectionString = path
cnStr.Provider = provider
cnStr.open

' execute sql and open as recordset
sqlStr = "Select * From tblusers where username = '" _
& Request.Form("UID") & "' and password = '" & Request.Form("PWD") & "'"

' Opens the returned values from the SQL as a recordset, ready for iteration
by ASP
<<< LINE 53 >>> set rcSet = cnStr.Execute(sqlStr)
' validate variables against database
If (not rcSet.BOF) and (not rcSet.EOF) then
response.cookies("validated_user") = frmUsername
response.write "<h1>Login successful!</h1>"
response.write "<p>Welcome " & rcSet.fields(1) & "</p>"
else
response.write "incorrect username and/or password"
end if
%>

Unfortunately I am new to all this and would welcome any feedback on this
error.

Malcolm




.



Relevant Pages

  • Re: how to save a dataset back to the database
    ... > i validate the dataset against the business logic and once everything ... the database has 5 columns and so does my dataset. ... Use the Update method on the DataAdapter: ... Dim da As New OleDbDataAdapter ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... It looks like your databases folder is outside the root of your web ... I created a database exactly as you said, the only change I made was to ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... It looks like your databases folder is outside the root of your web ... I created a database exactly as you said, the only change I made was to ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... I created a database exactly as you said, the only change I made was to ... upload it into the 'databases' folder, and not a folder called 'App_Data', ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Size matters to some
    ... The underlying remote database connection ... physical layer is actually managing it all, the logical layer is forced to ... constraints as specified by developers. ... want to validate the information getting written. ...
    (comp.databases.pick)

Loading