Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 2nd, 2004, 06:03 PM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB.Recordset error '800a0bb9' Line 24

I'm getting the following error using Netscape 7.1 with a login page I'm trying to get to work:

ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/sites/recipes/login2.asp, line 24

The page can be found at:
http://www.rossdunbar.com/sites/recipes/login2.asp

In Dreamweaver, Line 24 reads:

 MM_rsUser.ActiveConnection = MM_Recipes_STRING

I'm using a custom connection string to connect to an Access database called "Recipes.mdb" When I test the string in Dreamweaver it connects fine both locally and remotely.

I can't figure out what I'm doing wrong? Thanks in advance for your help.



 
Old August 2nd, 2004, 09:08 PM
Friend of Wrox
 
Join Date: May 2003
Posts: 202
Thanks: 0
Thanked 1 Time in 1 Post
Default

It would probably help if you posted the asp code in your page. At least the code 10 or so lines above and below line 24.

It's common for the reported error line to be slightly wrong and the error is actually on another line. This is usually caused by server-side includes confusing the line counter.

Sometimes when I can't figure out exactly which line has the problem, I'll insert:
Code:
Response.Write "DEBUG"
before suspected lines. If the DEBUG message shows up in your page, then the error is after the DEBUG line. Move the DEBUG statement until you find the actual line with the error.

Bruce Luckcuck
Director, Applications & Support Services
Wiley Publishing, Inc.
 
Old August 2nd, 2004, 10:29 PM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's the code for the whole page. Thanks again for looking at this:


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
if (cStr(Request.Form("Login"))<>"") then
  if (cStr(Request.Form("StoreProfile"))<>"") then
    Response.Cookies("UserName") = cStr(Request("UserName"))
  else
    Response.Cookies("UserName") = ""
  end if
  today = DateAdd("d",30, Date())
  Response.Cookies("UserName").Expires = today
end if
%>
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("UserName"))
If MM_valUsername <> "" Then
  MM_fldUserAuthorization="UserAccess"
  MM_redirectLoginSuccess="protectedpage.asp"
  MM_redirectLoginFailed="UserLogin/UserLogin_VBS/login.asp?failed=true"
  MM_flag="ADODB.Recordset"
  set MM_rsUser = Server.CreateObject(MM_flag)
  MM_rsUser.ActiveConnection = MM_Recipes_STRING
  MM_rsUser.Source = "SELECT UserName, UserPassword, UserID"
  If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
  MM_rsUser.Source = MM_rsUser.Source & " FROM Users WHERE UserName='" & Replace(MM_valUsername,"'","''") &"' AND UserPassword='" & Replace(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
    Session("MM_UserID") = cStr(MM_rsUser.Fields.Item("UserID").Value)
    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 true 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
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>User Login</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/intranet.css" rel="stylesheet" type="text/css">

</head>

<body>
<div id="header">
<img src="images/intranet/logo_leafmedia.gif" alt="Leaf Media" width="319" height="88">
</div>
<div id="topnav">&nbsp; <span class="buttonselected" id="leftbutton">USER LOGIN</span> <span class="buttonselected" id="leftcenterbutton"><a href="EmployeeLookup/EmployeeLookup_VBS/employee_search.asp">EMPLOYEE
LOOKUP</a></span> <span class="buttons" id="rightcenterbutton"><a href="ConferenceRoomScheduler/ConferenceRoomScheduler_VBS/existingmeeting_request.asp">CONFERENCE ROOM</a></span> <span class="buttons" id="rightbutton"><a href="InOutBoard/InOutBoard_VBS/dashboard.asp">IN/OUT BOARD</a></span> </div>
<div id="separator"></div>
<div id="wrapper">
  <table width="100%" border="0" cellpadding="0" cellspacing="0" id="midtable" >
    <tr id="contentrow">
      <td>
        <table width="190" border="1" cellpadding="2" cellspacing="0" id="navtable">
          <tr>
            <td class="navigation">User Login</td>
          </tr>
          <tr>
            <td class="nav"><a href="UserLogin/UserLogin_VBS/login.asp">Login</a></td>
          </tr>
          <tr>
            <td class="nav"><a href="UserLogin/UserLogin_VBS/user_manager.asp">User Manager</a></td>
          </tr>
          <tr>
            <td class="nav"><a href="UserLogin/UserLogin_VBS/user_statistics.asp">User Statistics</a></td>
          </tr>
        </table>
      <img src="images/intranet/breakthrough_bridge.gif" alt="abstract layout image" width="245" height="248"></td>
      <td width="100%" id="contentcell"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="100" bgcolor="#336699">&nbsp;</td>
        </tr>
        <tr>
          <td height="40"><table width="100%" class="layoutTable" border="0" cellpadding="6" cellspacing="0">
              <tr>
                <td width="150" align="center" valign="bottom" bgcolor="#6699CC" class="pageHeader">USER LOGIN </td>
                <td bgcolor="#336699">&nbsp;</td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td><form action="<%=MM_LoginAction%>" method="POST" name="UserLogin">
            <table width="100%" border="0" cellspacing="0" cellpadding="6">
              <tr>
                <td width="25">&nbsp;</td>
                <td colspan="2" class="smallText"><%if (cStr(Request("failed"))<>"") then Response.Write("The Login information you provided is not valid. Please try again.")%> </td>
              </tr>
              <tr>
                <td width="25">&nbsp;</td>
                <td class="formTitle">USER NAME</td>
                <td class="formField">
                  <input name="UserName" type="text" id="UserName" size="40" value="<%=Request.Cookies("UserName")%>"></td>
              </tr>
              <tr>
                <td width="25">&nbsp;</td>
                <td class="formTitle">PASSWORD</td>
                <td class="formField">
                  <input name="Password" type="password" id="Password" size="40"></td>
              </tr>
              <tr>
                <td width="25">&nbsp;</td>
                <td class="formTitle">&nbsp;</td>
                <td valign="baseline" class="formField"><input name="StoreProfile" type="checkbox" id="StoreProfile" value="checkbox"<%if (cstr(Request.Cookies("UserName"))<>"")then Response.Write("checked")%>>
        Save User Name</td>
              </tr>
              <tr>
                <td width="25">&nbsp;</td>
                <td class="formTitle">&nbsp;</td>
                <td class="formField">
                  <input name="Login" type="submit" id="Login" value="Login"></td>
              </tr>
              <tr>
                <td width="25">&nbsp;</td>
                <td colspan="2" align="center" valign="middle" class="smallText">New User? Please register using our online form.<br>
        Lost your User Name or Password? Use the online form to retrieve via email.</td>
              </tr>
            </table>
          </form> </td>
        </tr>
      </table>
        </td>

      <td width="44" id="spacercell"><img src="images/intranet/spacer.gif" width="44" height="10"></td>
    </tr>
  </table>
</div>
<div id="footer"> <img src="images/intranet/footer_dotabstract.gif" alt="footer image" width="245" height="125"></div>
</body>
</html>


 
Old August 2nd, 2004, 10:53 PM
Friend of Wrox
 
Join Date: May 2003
Posts: 202
Thanks: 0
Thanked 1 Time in 1 Post
Default

I may be missing it, but it doesn't look like MM_Recipes_STRING is ever assigned a value.

Bruce Luckcuck
Director, Applications & Support Services
Wiley Publishing, Inc.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Recordset error '800a0bb9' - PLEASE HELP! gmoney060 BOOK: Beginning ASP 3.0 3 April 25th, 2007 09:21 PM
ADODB.Recordset error '800a0bb9' Thamil Classic ASP Basics 3 October 5th, 2006 04:01 AM
ADODB.Recordset Error on wrong line???? Greywacke Classic ASP Databases 4 February 23rd, 2004 11:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.