JohannIcon
Programmer
I have the following code:-
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = " & Server.MapPath("../pnwebsite.mdb"
& ";" & _
"Persist Security Info=False"
Set cnn=Server.CreateObject("ADODB.Connection"
cnn.Open strConn
set rsTable = Server.CreateObject("ADODB.Recordset"
sqlquery = "SELECT * FROM Users WHERE (Name = " & PerName & "
and (Surname = " & PerSurname & "
and (Email = " & PerEmail & "
"
rsTable.open sqlquery, cnn, adOpenStatic, adLockOptimistic, adCmdText
if rsTable.EOF then
''Add a new record
rsTable.addnew
rsTable("Name"
= PerName
rsTable("Surname"
= PerSurname
rsTable("Email"
= PerEmail
rsTable("LastPollVoted"
= PerPoll
rsTable("DateRegistered"
= PerDateReg
rsTable("Password"
= PerPassword
rsTable.update
rsTable.close
cnn.close
end if
but the browser is giving me the following error:-
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
What is the problem?
Thanks for your help!
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = " & Server.MapPath("../pnwebsite.mdb"
"Persist Security Info=False"
Set cnn=Server.CreateObject("ADODB.Connection"
cnn.Open strConn
set rsTable = Server.CreateObject("ADODB.Recordset"
sqlquery = "SELECT * FROM Users WHERE (Name = " & PerName & "
rsTable.open sqlquery, cnn, adOpenStatic, adLockOptimistic, adCmdText
if rsTable.EOF then
''Add a new record
rsTable.addnew
rsTable("Name"
rsTable("Surname"
rsTable("Email"
rsTable("LastPollVoted"
rsTable("DateRegistered"
rsTable("Password"
rsTable.update
rsTable.close
cnn.close
end if
but the browser is giving me the following error:-
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
What is the problem?
Thanks for your help!