Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Problems with creating acount

help please . . .

8:09 am on Aug 27, 2005 (gmt 0)

New User

10+ Year Member

joined:Aug 3, 2005
votes: 0

I am building a web page for my shool project. 0n one of the page, i wrote this codes :

'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")

'Build connection
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
set rs=nothing
set conn=nothing
end if

'Add a record

'Put username and password in record
'Save record

set rs=nothing
set conn=nothing


During my trial, i got an error :

Error Type:
ADODB.Recordset (0x800A0BCD)
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.

1:37 pm on Aug 27, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 14, 2005
votes: 0

Looks like a recordset error. Like you tried to display in a web page or read into a variable record from the recordset that has been deleted or doesn't exist.

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... ;)

5:09 pm on Aug 27, 2005 (gmt 0)

New User

10+ Year Member

joined:Aug 3, 2005
votes: 0

Thanks a lot Ive taken note of that . . . ;)

But there seems to be another problem :

Error Type:
Microsoft JET Database Engine (0x80004005)
Could not use ''; file already in use.
/icvdo/create.asp, line 15

What must I do next?

9:11 pm on Aug 28, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 24, 2005
votes: 0

Sounds like your database wan't closed properly because the script stopped for the error. Restart IIS (or wait a while) then try again.

Use the following...

set rs=nothing
set conn=nothing

2:04 pm on Aug 29, 2005 (gmt 0)

New User

10+ Year Member

joined:Aug 3, 2005
votes: 0

Where Should I put down these codes?