Forums

ASP

This topic is locked

Help!!

Posted 02 Jan 2006 20:33:27
1
has voted
02 Jan 2006 20:33:27 Charlie Plampton posted:
im currently trying to create a login page for my site on my home intranet. but im having trouble and this error message keeps on appearing

Error Type:
Microsoft JET Database Engine (0x80040E14)
The INSERT INTO statement contains the following unknown field name: ''UserID''. Make sure you have typed the name correctly, and try the operation again.
/test/sign in.asp, line 64

it doesnt make ne scence. below is the code. can ne one help?

Username=Request.form("UserName"
Pwd=Request.Form("Password"

Set ADO=Server.CreateObject("ADODB.Connection"

CONNStr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db/users.mdb"

ADO.Open Connstr
sql="Select * From Users Where Username='" & Username & "'"
set ors=ADO.Execute(sql)
If ors.EOF then
Response.Write "User Account does not exist."
Else
If ors("Password" <> Pwd then
Response.Write "Invalid Password"
Else
UserID=ors("UserID"
SQL="Insert Into Loger ('UserID','Slate','Plate') Values (" & UserID & ",'#" & date() & "#','#" & Time() & "#')"
'SQL="Insert Into Loger (UserID) Values (" & UserID & ",')"
ado.execute(sql)
response.write "log on details Entered"
End if
End if


ADO.Close

End if
%>

cheers

Edited by - Shibby999Coz on 03 Jan 2006 13:00:10

Replies

Replied 03 Jan 2006 23:37:09
03 Jan 2006 23:37:09 jo blo replied:
It's telling you there it doesn't recognise the field name "UserID" in the table Loger <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

Have you tried removing the apostrophes in the isert into statement?

Replied 06 Jan 2006 12:19:47
06 Jan 2006 12:19:47 Charlie Plampton replied:
removing the apostrophes only brings up a new error screen.

Reply to this topic