hai
Iam creating website using ASP
i wnts my clients to register first to vist site using username and password,,this i need to do
iam getting error like this
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
in line
objRS.Open mySQL, objConn,adOpenKeyset, adLockPessimistic, adCmdText
my register coding are as follows which iam failed to get answer
<--------confirm.asp------------------->
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath ("db/db_name.mdb") & ";"
objConn.Open
%>
<%
DIM strusername, strpassword, stremail
strUsername =request.form("username")
strPassword = request.form("password")
strEmail = request.form("email")
IF strUsername <>"" AND strPassword<> "" AND strEmail<> "" THEN
DIM mySQL, objRS
mySQL = "SELECT * FROM user_list WHERE Username = ' " & strUsername & " ' "
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn,adOpenKeyset, adLockPessimistic, adCmdText
IF objRS.EOF THEN
objRS.AddNew
objRS("Username")=strUsername
objRS("Password")=strPassword
objRS("Email")=strEmail
objRS("date")=date()
objRS.Update
objRS.Close
Set objRS = Nothing
Response.Write "You have been successfully registered as: " & strUsername
ELSE
DIM X, strTempUsername, intCount, mySQL2, objRS2
DO UNTIL X=True
intCount = intCount + 1
strTempUsername = strUsername & intCount
strUsername = strTempUsername
mySQL2 = "SELECT * FROM tblMembers WHERE fUsername = ' " & strUsername & " ' "
Set objRS2 = Server.CreateObject("ADODB.Recordset")
objRS2.Open mySQL2, objConn, adOpenKeyset, adLockPessimistic, adCmdText
IF objRS2.EOF THEN
X=True
ELSE
intCount = intCount
END IF
LOOP
objRS2.Close
Set objRS2 = Nothing
Response.Write "That username has already been registered. Please click Back on your browser and try a different username. "
Response.Write "We suggest you try the below available username:</p>"
Response.Write "<b>• " & strUsername2 & "</b>"
END IF
ELSE
Response.Write "Please click Back on your browser and complete all three fields"
END IF
%>
thanks
sonaaa