Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2008
    Posts
    3

    Red face Unanswered: error message, please help

    I have an extranet database we built a while ago using access. I just switched over to a new hosting site and now i am getting some strange glitches that i don't know how to fix, that also did not happen on the old hosting site. First off it seems to happen only when browsing with firefox and not in ie and it also does not happen all the time.

    The first glitch i get is this error message:
    ADODB.Field error '800a0bcd'
    Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    /client/redirect.asp, line 19

    The second glitch that i get is i have mulitiple users on my extranet with different names and passwords. When im testing out the usernames and passwords sometimes it loads the previous user that was tested. Which is not good at all. Again, this doesnt happen all the time, just very randomly.

    Im not a programmer, but i need to fix this asap!!

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    The ASP code would help in debugging the problem
    George
    Home | Blog

  3. #3
    Join Date
    Oct 2008
    Posts
    3

    Red face here is my code

    Here is the code to my extranet login page:

    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../Connections/ragiUsers.asp" -->
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
    MM_valUsername=CStr(Request.Form("username"))
    If MM_valUsername <> "" Then
    MM_fldUserAuthorization=""
    MM_redirectLoginSuccess="redirect.asp"
    MM_redirectLoginFailed="LoginFailed.asp"
    MM_flag="ADODB.Recordset"
    set MM_rsUser = Server.CreateObject(MM_flag)
    MM_rsUser.ActiveConnection = MM_ragiUsers_STRING
    MM_rsUser.Source = "SELECT UserName, Password"
    If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
    MM_rsUser.Source = MM_rsUser.Source & " FROM Users WHERE UserName='" & MM_valUsername &"' AND Password='" & CStr(Request.Form("password")) & "'"
    MM_rsUser.CursorType = 0
    MM_rsUser.CursorLocation = 2
    MM_rsUser.LockType = 3
    MM_rsUser.Open
    If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername
    If (MM_fldUserAuthorization <> "") Then
    Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization ).Value)
    Else
    Session("MM_UserAuthorization") = ""
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And false Then
    MM_redirectLoginSuccess = Request.QueryString("accessdenied")
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginSuccess)
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    <html>
    <head>

    <title>Extranet</title>
    <link href="resource.css" rel="stylesheet" type="text/css">

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <!--Fireworks MX 2004 Dreamweaver MX 2004 target. Created Mon Dec 04 16:08:24 GMT-0500 ( ) 2006-->
    <script language="JavaScript">
    <!--
    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    //-->
    </script>

    Here is the code to my redirect page:

    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../Connections/ragiUsers.asp" -->
    <%
    Dim reDirect__MMColParam
    reDirect__MMColParam = "1"
    if (Session("MM_UserName") <> "") then reDirect__MMColParam = Session("MM_UserName")
    %>
    <%
    set reDirect = Server.CreateObject("ADODB.Recordset")
    reDirect.ActiveConnection = MM_ragiUsers_STRING
    reDirect.Source = "SELECT * FROM Users WHERE UserName = '" + Replace(reDirect__MMColParam, "'", "''") + "'"
    reDirect.CursorType = 0
    reDirect.CursorLocation = 2
    reDirect.LockType = 3
    reDirect.Open()
    reDirect_numRows = 0
    %>

    <% response.redirect (reDirect.Fields.Item("URL").Value) %>


    <html>
    <head>
    <title>Re-Direct...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    </body>
    </html>
    <%
    reDirect.Close()
    %>


    Sorry!

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by Megan_RAGI
    The first glitch i get is this error message:
    ADODB.Field error '800a0bcd'
    Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    /client/redirect.asp, line 19
    so trap for that error if BOF AND EOF are true then you have an empty recordset. so trap for that error and handle it gracefully
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Oct 2008
    Posts
    3

    Red face need help with database problems

    I have an extranet database we built a while ago using access. I just switched over to a new hosting site and now i am getting some strange glitches that i don't know how to fix, that also did not happen on the old hosting site. First off it seems to happen only when browsing with firefox and not in ie and it also does not happen all the time.

    The first glitch i get is this error message:
    ADODB.Field error '800a0bcd'
    Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    /client/redirect.asp, line 19

    The second glitch that i get is i have mulitiple users on my extranet with different names and passwords. When im testing out the usernames and passwords sometimes it loads the previous user that was tested. Which is not good at all. Again, this doesnt happen all the time, just very randomly.

    Im not a programmer, but i need to fix this asap!!

    Here is my code for the login page:
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../Connections/ragiUsers.asp" -->
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
    MM_valUsername=CStr(Request.Form("username"))
    If MM_valUsername <> "" Then
    MM_fldUserAuthorization=""
    MM_redirectLoginSuccess="redirect.asp"
    MM_redirectLoginFailed="LoginFailed.asp"
    MM_flag="ADODB.Recordset"
    set MM_rsUser = Server.CreateObject(MM_flag)
    MM_rsUser.ActiveConnection = MM_ragiUsers_STRING
    MM_rsUser.Source = "SELECT UserName, Password"
    If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
    MM_rsUser.Source = MM_rsUser.Source & " FROM Users WHERE UserName='" & MM_valUsername &"' AND Password='" & CStr(Request.Form("password")) & "'"
    MM_rsUser.CursorType = 0
    MM_rsUser.CursorLocation = 2
    MM_rsUser.LockType = 3
    MM_rsUser.Open
    If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername
    If (MM_fldUserAuthorization <> "") Then
    Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization ).Value)
    Else
    Session("MM_UserAuthorization") = ""
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And false Then
    MM_redirectLoginSuccess = Request.QueryString("accessdenied")
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginSuccess)
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    <html>
    <head>

    <title>Extranet</title>
    <link href="resource.css" rel="stylesheet" type="text/css">

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <!--Fireworks MX 2004 Dreamweaver MX 2004 target. Created Mon Dec 04 16:08:24 GMT-0500 ( ) 2006-->
    <script language="JavaScript">
    <!--
    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    //-->
    </script>


    Here is my code on the redirect page:

    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../Connections/ragiUsers.asp" -->
    <%
    Dim reDirect__MMColParam
    reDirect__MMColParam = "1"
    if (Session("MM_UserName") <> "") then reDirect__MMColParam = Session("MM_UserName")
    %>
    <%
    set reDirect = Server.CreateObject("ADODB.Recordset")
    reDirect.ActiveConnection = MM_ragiUsers_STRING
    reDirect.Source = "SELECT * FROM Users WHERE UserName = '" + Replace(reDirect__MMColParam, "'", "''") + "'"
    reDirect.CursorType = 0
    reDirect.CursorLocation = 2
    reDirect.LockType = 3
    reDirect.Open()
    reDirect_numRows = 0
    %>

    <% response.redirect (reDirect.Fields.Item("URL").Value) %>


    <html>
    <head>
    <title>Re-Direct...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    </body>
    </html>
    <%
    reDirect.Close()
    %>

Posting Permissions

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