By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,868 Members | 1,991 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,868 IT Pros & Developers. It's quick & easy.

Error ADODB.Connection error '800a0bb9' line 16

P: 2
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


Expand|Select|Wrap|Line Numbers
  1.     <%
  2.     DIM strUsername
  3.     strUsername = Request.Form("Username")
  4.     IF strUsername <> "" THEN
  5.     %>
  6.  
  7.     <!--#inlcude file="confirm_test.asp"-->
  8.  
  9.     <%
  10.     DIM mySQL, objRS, rs 
  11.     Set objRS = Server.CreateObject("ADODB.Connection")
  12.     objRS.Open "Provider=MSDASQL.1;Password=****;Persist Security Info=True;User ID=****;Data Source=****"  
  13.     mySQL = "SELECT username, email_addr, medacist_password  FROM medacist_user WHERE username = '" & strUsername & " ' "
  14.     Set rs = objRS.Execute(mySQL)
  15.  
  16.     IF objRS.EOF THEN
  17.     Response.Write "<div align='center'>Sorry, that username does not exist. Please click back on your browser and enter a different username.</div>"
  18.  
  19.     ELSE
  20.     %>
  21.  
  22.     <form name="UpdatePassword" method="post" action="reset_form.asp">
  23.     <table>
  24.     <tr><td>Username:</td><td>
  25.     <input type="text" name="Username" size="50" value='<%=objRS("Username")%>'>
  26.     </td></tr>
  27.     <tr><td>Password:</td><td>
  28.     <input type="text" name="Password" size="50" value='<%=objRS("Password")%>'>
  29.     </td></tr>
  30.     </table>
  31.     <input type="submit" name="Submit" value="Reset">
  32.     </form>
  33.  
  34.     <%
  35.     END IF
  36.  
  37.     objRS.Close
  38.     Set objRS = Nothing
  39.     %>
  40.  
  41.     <%
  42.     ELSE
  43.     Response.Write "Please click back on your browser and enter your username."
  44.     END IF
  45.     %>
  46.  
  47.  
Jan 8 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.