Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: ocean10000
'Save entered username and password
Username = Request.Form("txtUsername")
Password = Request.Form("txtPassword")
RepeatPassword = Request.Form("txtRepeatPassword")
Fullname = Request.Form("txtFullname")
'Check if username and password are entered
if Username = "" then Response.redirect("index.asp?login=createnamefailed")
if Password = "" then Response.Redirect("index.asp?login=createpassfailed")
if Password <> RepeatPassword then Response.Redirect("index.asp?login=createpassfailed")
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("database.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
'Open all records
rs.Open "SELECT * FROM userlist", conn, 3, 3
'Check if username doesn't already exist
do while not rs.EOF
if rs("username")=Username then
'Add a record
'Put username and password in record
During my trial, i got an error :
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
Can you guys tell me whats wrong? It'll help a lot for me.
Usually it means you've run a query to the database where no records are returned or then tried to read from a recordset that contains no data.
I'd go check to make sure theres a record in the recordset before reading it in allow some fault tolerance for your application like 'If NOT rsRecordSet.EOF Then').
Hope that helps... ;)