I'm getting above error on line 16 which is IF objRS.EOF THEN. I'm trying to create a forgotten password form. where user enter his/her email and will send a link to reset the password. Here is where I stuck. please help
Code:
<%
DIM strUsername
strUsername = Request.Form("Username")
IF strUsername <> "" THEN
%>
<!--#inlcude file="confirm_test.asp"-->
<%
DIM mySQL, objRS, rs
Set objRS = Server.CreateObject("ADODB.Connection")
objRS.Open "Provider=MSDASQL.1;Password=****;Persist Security Info=True;User ID=****;Data Source=****"
mySQL = "SELECT username, email_addr, medacist_password FROM medacist_user WHERE username = '" & strUsername & " ' "
Set rs = objRS.Execute(mySQL)
IF objRS.EOF THEN
Response.Write "<div align='center'>Sorry, that username does not exist. Please click back on your browser and enter a different username.</div>"
ELSE
%>
<form name="UpdatePassword" method="post" action="reset_form.asp">
<table>
<tr><td>Username:</td><td>
<input type="text" name="Username" size="50" value='<%=objRS("Username")%>'>
</td></tr>
<tr><td>Password:</td><td>
<input type="text" name="Password" size="50" value='<%=objRS("Password")%>'>
</td></tr>
</table>
<input type="submit" name="Submit" value="Reset">
</form>
<%
END IF
objRS.Close
Set objRS = Nothing
%>
<%
ELSE
Response.Write "Please click back on your browser and enter your username."
END IF
%>