PDA

View Full Version : Microsoft VBScript runtime (0x800A01A8) Object Required "


swartzieee
05-11-2006, 04:57 AM
Here is my code:

<%
DIM strEmail
strEmail = Request.Form("email")

IF strEmail <> "" THEN
%>
<%
DIM sql, rs, Conn

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath ("/swartzjm/datastore/login.mdb") & ";"
Conn.Open

sql = "SELECT email, password, username FROM login WHERE email = '" & strEmail & "'"
Set rs = Server.CreateObject( "ADODB.Recordset" )
rs.Open sql, Conn

IF rs.EOF THEN
Response.Write "That email address was not found in our database."
Response.Write "<b>Please click Back on your browser and enter the email address you registered with.</b>"
ELSE
DIM strPassword, strUsername
strPassword = rs("password")
strUsername = rs("username")

DIM mail, objMail
Set objMail = Server.CreateObject("CDO.Message")
objMail.From = "Webmaster@CareersandJobs.com"
objMail.Subject = "Forgotten Login Information"
objMail.To = strEmail
objMail.TextBody = "Here is your login information for the email address of " & strEmail & vbCrLf & _
"Username: " & strUsername & vbCrLf & _
"Password: " & strPassword
objMail.Send
Set objMail = nothing

Response.Write "Your password has been sent to your email address." & "<br>"

Response.Write "<br>" & "<b> Please allow up to 24 hours to recieve your login information. </b>"
END IF

ELSE
Response.Write "Please click Back on your browser and enter the email address you registered with."
END IF

Conn.close
Set Conn = nothing

rs.close
Set rs = nothing
%>

degsy
05-11-2006, 02:43 PM
You won't get much, if any help by just posting a bunch of code.

swartzieee
05-11-2006, 02:55 PM
This code worked last month without any problems. The error message I am getting is Microsoft VBScript runtime (0x800A01A8) Object Required " . I looked it up and said something about my connection to the database but to me nothing looks wrong. The line number at which a problem is happening is at Conn.close or Set Conn = Nothing.

degsy
05-11-2006, 03:12 PM
Try closing your recordset before closing the connection.

swartzieee
05-11-2006, 03:20 PM
Ill give that a try. Thanks

swartzieee
05-11-2006, 07:35 PM
Moving rs.close about the conn.close did not fix the error.. the error i got is Microsoft VBScript runtime error '800a01a8'

Object required: ''

mehere
05-12-2006, 04:40 AM
what line in your code is the error pointing to?