Object required - vbscript

Results 1 to 2 of 2

Thread: Object required - vbscript

  1. #1
    Join Date
    Dec 1969

    Default Object required - vbscript

    I am trying to do a simple forgotten password file here, where the password is returned to the html page.<BR><BR>The problem is this error: <BR><BR>Error Type:<BR>Microsoft VBScript runtime (0x800A01A8)<BR>Object required: &#039;&#039;<BR>/Kosy/password.asp, line 24<BR><BR><BR>objRS.open strSQL is line 24<BR><BR>any ideas?<BR><BR><BR><BR>[code language="language"]<BR>&#060;% Option Explicit %&#062;<BR>&#060;%<BR><BR>&#039;// NOTE: submitted form values should be validated before use to prevent hacks and sql injection attacks<BR>dim strEmail, strCheck<BR>strEmail = request.form("CusEmail")<BR>strCheck = request.form("CusBirthdate")<BR><BR>dim objRS, objCon, strSQL, strPass, adoCon, strCon, rsCheckUser <BR>&#039;// make your normal connection to your database<BR><BR>Set adoCon = Server.CreateObject("ADODB.Connection")<BR> <BR>&#039;Database connection info and driver<BR>strCon = "provider=Microsoft.jet.oledb.4.0;data source=" & Server.MapPath(".") & "/kosy.mdb" <BR><BR>&#039;Set an active connection to the Connection object<BR>adoCon.Open strCon<BR><BR>&#039;Create a recordset object<BR>Set rsCheckUser = Server.CreateObject("ADODB.Recordset")<BR><BR>strS QL = "select CustomerPassword from customer where CustomerEmail=&#039;" & strEmail & "&#039; and CustomerBirthdate = &#039;" & strCheck & "&#039;"<BR>objRS.open strSQL<BR><BR><BR>If objRS.eof then<BR>response.write "No matching records found"<BR>else<BR>with response<BR>.write "The password for user "<BR>.write strEmail <BR>.write " is " & objRS("CustomerPassword")<BR>end with<BR>end if<BR>&#039;// close the recordset and connection objects.<BR>%&#062;<BR>[/code]

  2. #2
    Join Date
    Dec 1969

    Default RE: Object required - vbscript

    Set rsCheckUser = Server.CreateObject("ADODB.Recordset") <BR><BR>strSQL = "select CustomerPassword from customer where CustomerEmail=&#039;" & strEmail & "&#039; and CustomerBirthdate = &#039;" & strCheck & "&#039;" <BR>objRS.open strSQL <BR><BR>You set rsCheckUser as your recordset object but didnt use it...<BR>objRS is not an object here that you can use.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts