Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: VBScript runtime error '800a01a8'

Results 1 to 10 of 10
Share This Thread →
  1. #1
    pwsparrow is offline Contributing User
    Join Date
    Nov 2004
    Posts
    138
    Rep Power
    10

    VBScript runtime error '800a01a8'

    Hi, Im getting this error, which states ...

    Object required: ''

    /loginverification.asp, line 21

    Any ideas?

    Code:
    <%
    
    	dim RS 
    
    	reqUser = Replace(request.form("Userid"),"'","''")
    	reqPass = Replace(request.form("Password"),"'","''")
    
    	mysql = "SELECT username, password FROM NHITAmembership where UserName='"&reqUser&"' AND Password='"&reqPass&"'"
    
    cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" 
    cst = cst & Server.MapPath("../NHITADATABASE2.mdb") 
    set MyConn = CreateObject("ADODB.Connection") 
    MyConn.Mode = 3
    Myconn.Open cst 
    
    	if RS.EOF and RS.BOF then <<-----Line 21
    		RS.Close
    		MyConn.close
    		URL=request.form("url")
    		response.redirect(URL+"?User=1")
    	else
    		RS.Close
    		MyConn.close
    		Session("UserName") = reqUser
    		response.redirect("private/members/login.asp")			
    	end if
    %>

  2. #2
    bslintx's Avatar
    bslintx is offline Contributing User
    Join Date
    Apr 2004
    Location
    United States
    Posts
    1,814
    Rep Power
    12
    change set MyConn = CreateObject("ADODB.Connection")

    to

    set RS = CreateObject("ADODB.Recordset")


    Code:
    <%
    
    	dim RS 
    
    	reqUser = Replace(request.form("Userid"),"'","''")
    	reqPass = Replace(request.form("Password"),"'","''")
    
    	mysql = "SELECT username, password FROM NHITAmembership where UserName='"&reqUser&"' AND Password='"&reqPass&"'"
    
    set cst = CreateObject("ADODB.Connection") 
    set RS = CreateObject("ADODB.Recordset") 
    cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" 
    cst = cst & Server.MapPath("../NHITADATABASE2.mdb") 
    
    RS.Open mysql, cst
    	if RS.EOF and RS.BOF then 
    		RS.Close
                              cst.close
    		URL=request.form("url")
    		response.redirect(URL+"?User=1")
    	else
    		RS.Close
                              cst.close
    		Session("UserName") = reqUser
    		response.redirect("private/members/login.asp")			
    	end if
    %>

    sorry elija....recoded while you posted and didn't replace the connection w/ recordset....hence edited
    Last edited by bslintx; June 10th, 2005 at 10:49 AM. Reason: recoded
    Please give respect to those that helped solve an issue by clicking on the icon

  3. #3
    elijathegold's Avatar
    elijathegold is offline Senior Fire Wizard
    Join Date
    Feb 2005
    Location
    Ashford, Kent. England
    Posts
    5,651
    Rep Power
    314
    You need create and open a recordset called RS.
    And he picked it all up... in his pick-up.





    Friends of Shemzilla

  4. #4
    pwsparrow is offline Contributing User
    Join Date
    Nov 2004
    Posts
    138
    Rep Power
    10
    ADODB.Connection error '800a0bb9'

    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

    /loginverification.asp, line 21

    Code:
    if RS.EOF and RS.BOF then <-- line 21
    Quote Originally Posted by bslintx
    change set MyConn = CreateObject("ADODB.Connection")

    to

    set RS = CreateObject("ADODB.Recordset")


    [code]

    <%

    dim RS

    reqUser = Replace(request.form("Userid"),"'","''")
    reqPass = Replace(request.form("Password"),"'","''")

    mysql = "SELECT username, password FROM NHITAmembership where UserName='"&reqUser&"' AND Password='"&reqPass&"'"

    set cst = CreateObject("ADODB.Connection")
    set RS = CreateObject("ADODB.Recordset")
    cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    cst = cst & Server.MapPath("../NHITADATABASE2.mdb")

    cst.Execute mysql

    if RS.EOF and RS.BOF then <<-----Line 21
    RS.Close
    cst.close
    URL=request.form("url")
    response.redirect(URL+"?User=1")
    else
    RS.Close
    cst.close
    Session("UserName") = reqUser
    response.redirect("private/members/login.asp")
    end if
    %>
    [code]


    sorry elija....recoded while you posted and didn't replace the connection w/ recordset....hence edited

  5. #5
    bslintx's Avatar
    bslintx is offline Contributing User
    Join Date
    Apr 2004
    Location
    United States
    Posts
    1,814
    Rep Power
    12
    sorry pw...i opened the sql only...lol..need to obviously open the connection too...try again w/ updated code

  6. #6
    pwsparrow is offline Contributing User
    Join Date
    Nov 2004
    Posts
    138
    Rep Power
    10
    Sorry I replied before you edited. I now get

    Microsoft VBScript runtime error '800a01a8'

    Object required: 'cst'

    /loginverification.asp, line 15

  7. #7
    bslintx's Avatar
    bslintx is offline Contributing User
    Join Date
    Apr 2004
    Location
    United States
    Posts
    1,814
    Rep Power
    12
    let's clean it up a little:

    Code:
      reqUser = Replace(request.form("Userid"),"'","''")
    	reqPass = Replace(request.form("Password"),"'","''")
    
      Set cst = Server.CreateObject ("ADODB.Connection")
      Set RS = Server.CreateObject ("ADODB.Recordset")
      DBpath = server.MapPath("../NHITADATABASE2.mdb")
      strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBpath & ";"
      cst.Open strConn	
    
    mysql = "SELECT username, password FROM NHITAmembership where UserName='"&reqUser&"' AND Password='"&reqPass&"'"
    
    RS.Open mysql, cst
    	if RS.EOF and RS.BOF then 
    		RS.Close
                              cst.close
    		URL=request.form("url")
    		response.redirect(URL+"?User=1")
    	else
    		RS.Close
                              cst.close
    		Session("UserName") = reqUser
    		response.redirect("private/members/login.asp")			
    	end if
     Set RS = Nothing
     Set cst = Nothing
    %>

  8. #8
    bslintx's Avatar
    bslintx is offline Contributing User
    Join Date
    Apr 2004
    Location
    United States
    Posts
    1,814
    Rep Power
    12
    let's clean it up a little:

    Code:
      reqUser = Replace(request.form("Userid"),"'","''")
      reqPass = Replace(request.form("Password"),"'","''")
    
      Set cst = Server.CreateObject ("ADODB.Connection")
      Set RS = Server.CreateObject ("ADODB.Recordset")
      DBpath = server.MapPath("../NHITADATABASE2.mdb")
      strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBpath & ";"
      cst.Open strConn	
    
    mysql = "SELECT username, password FROM NHITAmembership where UserName='"&reqUser&"' AND Password='"&reqPass&"'"
    
    RS.Open mysql, cst
    
    If RS.EOF OR RS.BOF Then 
       RS.Close
       cst.Close
       Set RS = Nothing
       Set cst = Nothing
      URL=request.form("url")
      Response.Redirect(URL+"?User=1")
    Else
      RS.Close
      cst.Close
      Session("UserName") = reqUser
      Response.Redirect("private/members/login.asp")
    End If
    %>
    Last edited by bslintx; June 10th, 2005 at 11:04 AM.

  9. #9
    pwsparrow is offline Contributing User
    Join Date
    Nov 2004
    Posts
    138
    Rep Power
    10
    Excellent man, works fine. Excuse my ignorance, but i'm still learning slowly. Now this is a DSN-less connection? Or rather, I can replace other DSN code with this DSN-less connection code?

    Thank you

  10. #10
    bslintx's Avatar
    bslintx is offline Contributing User
    Join Date
    Apr 2004
    Location
    United States
    Posts
    1,814
    Rep Power
    12
    that is correct....it's a physical/direct connect...faster more efficient then dsn beause dsn looks up registry settings befor executing....simply change path name...glad it worked for you!...good luck

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. Microsoft VBScript runtime error '800a000d'
    By titttili in forum ASP Development
    Replies: 9
    Last Post: June 3rd, 2005, 04:30 AM
  2. Microsoft VBScript runtime error '800a0046'
    By leoumar in forum ASP Development
    Replies: 1
    Last Post: November 9th, 2004, 08:28 PM
  3. Microsoft VBScript runtime error '800a01a8'
    By 5678 in forum ASP Development
    Replies: 3
    Last Post: October 23rd, 2004, 08:22 PM
  4. VBScript Runtime Error!
    By Pras in forum ASP Development
    Replies: 1
    Last Post: March 1st, 2004, 11:21 AM
  5. VBScript runtime error '800a01a8'
    By lunula in forum ASP Development
    Replies: 1
    Last Post: December 6th, 2003, 10:48 PM

ASP Free Advertisers and Affiliates