Hi, I just set up a thing this afternoon where my users receive an email when they register on my site and that was fine. A few minutes ago I tried to set up my register page so that the same username can't be registered twice and then everything went psycho! My database is still working ok but if I try to view my relationships it goes psych and this error keeps coming up saying that the Microsoft Jet Engine stopped the process because me and another user are attempting to change the same data at the same time??? Can anyone help me? My code is below?

<%@ Language=VBScript %>
<%Option Explicit %>
<!--#include file="adovbs.inc"-->

<%
Dim objConn,user1,sqluser,rs
user1 = Request.Form("user")

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../Databases/db1.mdb"))

sqluser = "SELECT * FROM User WHERE Username = '"&user1&"'"
Set rs = objConn.Execute(sqluser)
if not rs.eof then
Do while NOT rs.eof
response.redirect ("DuplicateUsername.htm")
rs.movenext
Loop
else
Dim objRS
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.Open "User", objConn, adLockOptimistic, adCmdTable
objRS.AddNew
objRS("Forename") = Request.Form("forename")
objRS("Surname") = Request.Form("surname")
objRS("Username") = Request.Form("user")
objRS("Password")= Request.Form("pass")
objRS("Address")= Request.Form("address")
objRS("Phone")= Request.Form("phone")
objRS("Email_Address")= Request.Form("emailaddress")
objRS("Date_of_Birth")= Request.Form("dob")
objRS.Update
objRS.Close
Set objRS=Nothing
objConn.Close
Set objConn=Nothing
end if

Dim username,password

username = Request.Form("user")
password = Request.Form("pass")

If username <> "" then
Response.Write "Your USERNAME is:"& username &"
"
Response.Write "Your PASSWORD is:"& password &"
"
End if

dim pass_key,eid,objrs1,sql,objmail,bool
set objrs1=server.createObject("adodb.recordset")

'storing the value of email ID in eid variable
eid=trim(request.form("emailaddress"))

'making conncetion to database

'making query for seraching the email id from database
sql="select * from User where Email_Address= '"&eid&"' "
objrs1.open sql ,objConn



if not objrs1.eof then
bool=true
while not objrs1.eof
pass_key=objrs1("Password")
objrs1.movenext
wend

'sending password through CDONTS
set objmail=server.createObject("cdonts.newmail")
objmail.from="DPT@Diet.com"
objmail.to=eid
objmail.subject="Registration"
objmail.body="Thank you for registering with DPT. Your password is" & pass_key
objmail.send
set objmail=nothing
Response.write"Your Password has been emaild at" & pass_key

'if record does'nt exist

else
bool=false
Response.write"Sorry Your Email ID Doesn't Exist or check Your Email ID"

end if
objrs1.close
Set objrs1=Nothing
objConn.Close
Set objConn=Nothing

%>



<html>
<body bgcolor="#6699cc">
<p>
<b>You're registered. Check your email account for a confirmation of your registration Details</b></p>
<A href="Blank.htm"><b><i>Click Here to Log in </i></b></A>
</body>
</html>