Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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 July 12th, 2004, 01:40 AM
Authorized User
 
Join Date: Feb 2004
Location: Karachi, , Pakistan.
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to knight
Default ADODB.Recordset (0x800A0BB9)

my code is
--------------

<%

    Response.Buffer = True 'Turn buffering on
    Response.Expires = -1 'Page expires immediately

'Constants
    Const MIN_PAGESIZE = 4 'Minimum pagesize
    Const MAX_PAGESIZE = 200 'Maximum pagesize
    Const DEF_PAGESIZE = 10 'Default pagesize
    'Set/initialize variables
'intilize the data
intRecord = 1
blnWhere = False

'-Get/set requested page
 intPage = 1
    if Not IsEmpty(Request("page")) Then
        if IsNumeric(Request("page")) Then
            intPage = CLng(Request("page"))
        End if
    End if
If intPage < 1 Then intPage = 1

'-Get/set requested pagesize
If IsEmpty(Request("pagesize")) Then 'Set to default
    intPageSize = DEF_PAGESIZE
Else
    intPageSize = MakeLong(Request("pagesize"))
    'Make sure it fits our min/max requirements
    If intPageSize < MIN_PAGESIZE Then
        intPageSize = MIN_PAGESIZE
    ElseIf intPageSize > MAX_PAGESIZE Then
        intPageSize = MAX_PAGESIZE
    End If
End If
    set rs=server.CreateObject("Adodb.Recordset")
    rs.open ("select * from member ORDER by messer_name asc"), conn,1,3
    rs.pagesize = intPageSize
 Public function Paging(ByVal intPage, ByVal intPageCount, ByVal intRecordCount)
        'Customize me to your liking...
        'Assumes that the paging request variable is named 'page'
        Dim strQueryString
        Dim strScript
        Dim intStart
        Dim intEnd
        Dim strRet
        Dim i
        if intPage > intPageCount Then
            intPage = intPageCount
        ElseIf intPage < 1 Then
            intPage = 1
        End if

        if intRecordCount = 0 Then
            strRet = "No Records Found"
        ElseIf intPageCount = 1 Then
            strRet = ""
        Else
            For i = 1 To Request.QueryString.Count
                if LCase(Request.QueryString.Key(i)) <> "page" Then
                    strQueryString = strQueryString & "&"
                    strQueryString = strQueryString & Server.URLEncode(Request.QueryString.Key(i)) & "="
                    strQueryString = strQueryString & Server.URLEncode(Request.QueryString.Item(i))
                End if
            Next
            For i = 1 To Request.Form.Count
                if LCase(Request.Form.Key(i)) <> "page" Then
                    strQueryString = strQueryString & "&"
                    strQueryString = strQueryString & Server.URLEncode(Request.Form.Key(i)) & "="
                    strQueryString = strQueryString & Server.URLEncode(Request.Form.Item(i))
                End if
            Next
            if Len(strQueryString) <> 0 Then
                strQueryString = "?" & Mid(strQueryString, 2) & "&"
            Else
                strQueryString = "?"
            End if
            strScript = Request.ServerVariables("SCRIPT_NAME") & strQueryString

            if intPage <= 10 Then
                intStart = 1
            Else
                if (intPage Mod 10) = 0 Then
                    intStart = intPage - 9
                Else
                    intStart = intPage - (intPage Mod 10) + 1
                End if
            End if
            intEnd = intStart + 9
            if intEnd > intPageCount Then intEnd = intPageCount

            strRet = "Page " & intPage & " of " & intPageCount & ": "

            if intPage <> 1 Then
                strRet = strRet & "<A href=""" & strScript
                strRet = strRet & "page=" & intPage - 1
                strRet = strRet & """><<PREv</A> "
            End if

            For i = intStart To intEnd
                if i = intPage Then
                    strRet = strRet & "<B>" & i & "</B> "
                Else
                    strRet = strRet & "<A href=""" & strScript
                    strRet = strRet & "page=" & i
                    strRet = strRet & """>" & i & "</A>"
                    if i <> intEnd Then strRet = strRet & " "
                End if
            Next

            if intPage <> intPageCount Then
                strRet = strRet & " <A href=""" & strScript
                strRet = strRet & "page=" & intPage + 1
                strRet = strRet & """>Next>></A>"
            End if
        End if

        Paging = strRet
    End function

%>
<html>
<head>
<title>WELCOME TO EPZA</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
a:hover { font-family: Arial, Helvetica, sans-serif; color: #003399; text-decoration: underline}
.unnamed1 { font-family: Arial, Helvetica, sans-serif; color: #333333; text-decoration: none; font-size: 8pt}
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=1,width=400,height=300,left = 362,top = 234');");
}


//-->
</SCRIPT>
<script language="JavaScript">
function postForm()
{

    document.forms[0].submit();
}
</script>
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<SCRIPT language=JavaScript src="menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT>




<script language=javascript>
function setValue()
{
    mn=getMenuByName("FollowMain")


    menu=eval("menu"+mn)
    menu[10]=parseInt(document.f1.t1.value)
}

</script>
<span class="unnamed1"></span> <span class="unnamed1"></span>
<table width="782" border="0" height="653" cellpadding="0" cellspacing="0" align="left">
  <tr>
    <td height="20" colspan="2" valign="top" bgcolor="#92B6DA">&nbsp;</td>
    <td height="20" valign="top" colspan="3" width="772" bgcolor="#92B6DA"> <div align="right"><b><b><b><b><b><b><b><b><a href="search.asp" class="unnamed1">Investors
        Search </a></b>
        |</b></b> <a href="sitemap.asp" class="unnamed1" target="_self"></a></b><a href="sitemap.asp" class="unnamed1" target="_self"></a></b><a href="sitemap.asp" class="unnamed1" target="_self"></a></b><a href="sitemap.asp" class="unnamed1" target="_self"></a></b><a href="sitemap.asp" target="_self" class="unnamed1">Site
        Map</a></b>
        | <b><a href="guidelines.asp" class="unnamed1" target="_self">Guide
        Lines</a></b>
        | <b><a href="evenrrs.asp" class="unnamed1">Event Calendar</a></b>
        | <b><a href="eligblity.asp" target="_self" class="unnamed1">Eligibility</a></b>
        | <b><a href="faqs.asp" target="_self" class="unnamed1">Faqs</a></b></div></td>
  </tr>
  <tr>
    <td height="608" colspan="5" valign="top">
      <div align="left">
        <table width="780" border="0" cellspacing="0" cellpadding="0">
          <tr valign="top">
            <td height="555" width="166" bgcolor="#FFFFFF"> <div align="left" class="unnamed1">
                <table width="157" border="0" height="40" align="center">
                  <tr>
                    <td height="62"> <div align="right"><img src="images/dotts.jpg" width="86" height="38"></div></td>
                  </tr>
                </table>
                <br>
                <br>
                </div></td>
            <td height="555" width="466"> <div align="left">
                <p><b> <b>
                  <br>
                  <img src="images/headingmembers.jpg" width="234" height="40" border="0">
                  <br>
                  </b></b></p>
                <table width="455" border="0" height="41" align="center">
                  <tr valign="top">
                    <td height="492"> <table width="420" border="0" cellspacing="0" cellpadding="0">
                        <%If Rs.EOF Then%>

                        <div align="center"></div>
                        <tr>
                          <td align="center" width="192"><b>No
                            Records found!</b></td>
                        </tr>
                        <%Else%>

                        <tr>
                        <tr>
                          <td height="56"> <table cellspacing="2" cellpadding=3 align=center width="85%">
                              <%
                If Rs.PageCount < intPage Then intPage = Rs.PageCount
                Rs.AbsolutePage = intPage Do While Not Rs.EOF And intRecord <= intPageSize
%>
                              <tr>
                                <td height="24"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td colspan="3">
                                        <strong><a href="investordetail.asp?memid=<%=rs("memid")%>" class="unnamed1" >
                                        <%Response.Write rs("messer_name") %>
                                        </a></strong> </td>
                                    </tr>
                                  </table></td>
                              </tr>
                              <%
    'if not rs("USite")=vbnullstring then 'looking for site
    'Response.Write ("<tr>")
    'Response.Write ("<td colspan='2' nowrap><a href='http://" & rs("Usite") & "' target=_blank>" & rs ("USite") & "</a></td></tr>" )
    'end if
    intRecord = intRecord + 1
    rs.movenext 'moving next record
    loop'end of circle
 %>
                              <tr>
                                <td height="24" colspan="3" align="center"> <div align="right"></div>

                                  <%=Paging(intPage, Rs.PageCount, Rs.RecordCount)%></td>
                              </tr>
                            </table></td>
                        </tr>
                        <%end if%>
                      </table></td>
                  </tr>
                </table>
              </div></td>
            <td height="555" width="148" bgcolor="#FFFFFF"> <table width="143" border="0" height="46">
                <tr>
                  <td><img src="images/searchbutt.jpg" width="60" height="27"></td>
                </tr>
                <tr valign="top">
                  <td height="80"> <form action="search1.asp" name="form1" >
                      <div align="right">
                        <input name="SearchString" type="text" id="SearchString">
                        <img src="images/gobutton.jpg" width="24" height="18" border="0" onClick="postForm()">
                      </div>
                    </form>
                    <div align="right"></div></td>
                </tr>
              </table>

              <img src="images/side_pictures7.jpg" width="138" height="205"><br>
              <br> </td>
          </tr>
        </table>
        <br><img src="images/bottom_r01_c1.jpg" width="1" height="1"><img src="images/home_r2_c1.jpg" width="780" height="16"><br>
      </div></td>
  </tr>

</table>
<span class="uaa"><br>
</span>
</body>
</html>
<%
rs.close
conn.close
set conn = nothing
%>
------------------
error at line showing in red color

error is
-----------
Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/epza_new/investors.asp, line 223

pls help


 
Old July 12th, 2004, 03:03 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Knight,

   Did u add msado15.dll or UUID for the ado.



rajani

 
Old July 12th, 2004, 04:41 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Knight,

This is often an ADODB.Recordset error.

You can also get this error if you try to use an uninitialized variable for the connection argument to ADODB.RecordSet.Open or when your paramters to recordset.open method conflict with each other.

I would suggest you to include adovbs.inc in your connection.asp include file.

Check - ADODB.Recordset error '800a0bb9'

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old November 9th, 2006, 05:08 AM
Registered User
 
Join Date: Nov 2006
Location: Manila, , Philippines.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi to all.. Can someone help me with my code?

I've been trying to fix it for two days and nothing happened.
It always gives me the same error:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

And it says that there is something wrong with line 4.

I am using two files here. The first one is an asp file (expprof.asp) which includes a database connection file (<!--#include file="dbconnect.asp">). And another file (expeduc.asp) which is also included in the first file (<!--#include file="expeduc.asp">).
What I want is for expeduc.asp to display information from the database, that is, if the database contains the "id" of the person displayed in expprof.asp, otherwise, display an ADD form to add information related again, to the person displayed in expprof.asp

<%
  Set rsNum = Server.CreateObject("ADODB.Recordset")
  numSQL = "select * from educations where exp_id = " & Request.QueryString("id") & ";"
  rsNum.Open numSQL, adoCon, 3, 3 ---> this line is said to have the error

  'count the number of records the person has in the educations table
  cnt = rsNum.RecordCount

  'if there are no records then the system must require the user to enter the information in the form below
  If (cnt < 1) Then
  %>
    <form name="addeduc" action="expeduc.asp?inc=1&id=<% Request.QueryString("id") %>&view=1" method="post">
    <table align="center">
     <tr><td align="center" colspan="2">Education</td></tr>
     <tr><td colspan="2"></td></tr>
     <tr>
      <td>Education:</td>
      <td><input type="text" name="educ" size="30"></td>
     </tr>
     <tr><td colspan="2" align="center"><input type="submit" name="Submit" value="Add"></td></tr>
    </table>
    </form>
  <%
     Set rsEduc = Server.CreateObject("ADODB.Recordset")
     educSQL = "select * from educations"
     rsEduc.Open educSQL, adoCon, 2, 3
     rsEduc.AddNew
     rsEduc.Fields("exp_id") = Request.QueryString("id")
     rsEduc.Fields("education") = Request.Form("educ")
     rsEduc.Update
     'rsEduc.Close
     'Response.Redirect("expeduc.asp")
     'Response.Write("Add Something")
  Else
     'display the Education when there is a record found in the database
     Response.Write(rsNum.Fields(2))
  End If
%>

watashi no namai wa hanako desu




Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in ADODB.Recordset (0x800A0BB9) rylemer Classic ASP Databases 3 November 9th, 2006 05:06 AM
ADODB.Recordset (0x800A0BB9) deepa12 BOOK: Beginning ASP 3.0 3 November 9th, 2006 04:43 AM
Recordset (0x800A0BB9) - ERROR myself Classic ASP Professional 1 August 17th, 2006 12:30 AM
ADODB.Recordset (0x800A0CB3)Current Recordset does tks_muthu Classic ASP Databases 0 June 16th, 2005 07:22 AM
How to get adodb.record from adodb.recordset John Pennington Pro VB Databases 1 November 20th, 2004 06:17 AM





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