Dynamic PageSize property

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Dynamic PageSize property

    I'm getting an error when trying to set the RecordSet.Pagesize property by
    using a variable.

    The error is:
    ----------------------------------------------------------------------------
    ----------------------
    ADODB.Recordset (0x800A0BB9)
    Arguments are of the wrong type, are out of acceptable range, or are in
    conflict with one another.
    /tmc/theform_resp.asp, line 122
    ----------------------------------------------------------------------------
    -----------------------

    Line 122 is:
    ----------------------------------------------------------------------------
    ----------------------
    recSet1.PageSize = recNum
    ----------------------------------------------------------------------------
    ---------------------
    The code that sets the variable recNum is:
    ----------------------------------------------------------------------------
    ---------------------
    If (Not IsNumeric(Request("resultsPerPage"))) Then
    response.Write("All<br>")
    recNum = 500
    Else
    recNum = CInt(Request.Form("resultsPerPage"))
    End If


    Thanks

    Darren



    Darren Heinrich Guest

  2. Similar Questions and Discussions

    1. Inspector Property: Dynamic tags
      Hi, I am working on an extension for Dreamweaver, currently on an Inspector. So what I understand is, that if you use the following tag: <!--...
    2. Missing Dynamic Button from Property Inspector
      OK, I have the Studio MX Book and am walking myself through the Tri Motors tutorial. Seems straight forward.....however, when I go back to my search...
    3. Composite control with dynamic controls depending on a property value
      Hi, all. I am really stuck here. I've written a few composite controls before and fully understand the "typical" scenarios. However, this one is...
    4. Dynamic height and pagesize adjustment of Grid
      Hey All, I have an application that uses DATAGRID control. The current grid have remarks field for each row, which can actually take upto 500...
    5. Dynamic PageSize based on Browser body.clientHeight
      Anyone have any ideas on how to adjust the datagrid's PageSize value based on the client browser size and re-adjust itself when a client re-sizes...
  3. #2

    Default Re: Dynamic PageSize property

    Darren Heinrich wrote:
    > I'm getting an error when trying to set the RecordSet.Pagesize
    > property by using a variable.
    >
    > The error is:
    > --------------------------------------------------------------------------
    --
    > ----------------------
    > ADODB.Recordset (0x800A0BB9)
    > Arguments are of the wrong type, are out of acceptable range, or are
    > in conflict with one another.
    > /tmc/theform_resp.asp, line 122
    > --------------------------------------------------------------------------
    --
    > -----------------------
    >
    > Line 122 is:
    > --------------------------------------------------------------------------
    --
    > ----------------------
    > recSet1.PageSize = recNum
    > --------------------------------------------------------------------------
    --
    > ---------------------
    > The code that sets the variable recNum is:
    > --------------------------------------------------------------------------
    --
    > ---------------------
    > If (Not IsNumeric(Request("resultsPerPage"))) Then
    > response.Write("All<br>")
    > recNum = 500
    > Else
    > recNum = CInt(Request.Form("resultsPerPage"))
    > End If
    >
    >
    > Thanks
    >
    > Darren
    Do you get the error when setting it to a literal value (.PageSize = 500)?
    or only when you set it to the variable? If the latter, then the variable
    does not contain what you think it contains. Response.Write it.

    HTH.
    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139