homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

Problems with creating acount
help please . . .

5+ Year Member

Msg#: 2957 posted 8:09 am on Aug 27, 2005 (gmt 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.



5+ Year Member

Msg#: 2957 posted 1:37 pm on Aug 27, 2005 (gmt 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+ Year Member

Msg#: 2957 posted 5:09 pm on Aug 27, 2005 (gmt 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?


WebmasterWorld Senior Member 10+ Year Member

Msg#: 2957 posted 9:11 pm on Aug 28, 2005 (gmt 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


5+ Year Member

Msg#: 2957 posted 2:04 pm on Aug 29, 2005 (gmt 0)

Where Should I put down these codes?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved