#1
  1. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    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
  3. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Apr 2004
    Location
    United States
    Posts
    1,814
    Rep Power
    13
    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
  4. #3
  5. Senior Fire Wizard
    ASP Mastermind (5000+ posts)

    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
  6. #4
  7. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    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
    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
  8. #5
  9. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Apr 2004
    Location
    United States
    Posts
    1,814
    Rep Power
    13
    sorry pw...i opened the sql only...lol..need to obviously open the connection too...try again w/ updated code
  10. #6
  11. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    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
  12. #7
  13. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Apr 2004
    Location
    United States
    Posts
    1,814
    Rep Power
    13
    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
    %>
  14. #8
  15. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Apr 2004
    Location
    United States
    Posts
    1,814
    Rep Power
    13
    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
    %>

    Comments on this post

    • pwsparrow agrees : excellent help
    Last edited by bslintx; June 10th, 2005 at 11:04 AM.
  16. #9
  17. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    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
  18. #10
  19. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Apr 2004
    Location
    United States
    Posts
    1,814
    Rep Power
    13
    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

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

IMN logo majestic logo threadwatch logo seochat tools logo