Professional Web Applications Themes

recordcount -1 - ASP

I'm simply trying to get a number of records returned in a recordset, and just get a -1. I have looke din a few books and other references, can't seem to find any answers. Anyone have any idea why I can't get a real number? For the record, the recordset is not empty. In fact, it has many records which I can see plainly on the screen. But when I do response.write rs.recordcount, it just shows -1...

  1. #1

    Default recordcount -1

    I'm simply trying to get a number of records returned in a recordset, and
    just get a -1. I have looke din a few books and other references, can't
    seem to find any answers. Anyone have any idea why I can't get a real
    number? For the record, the recordset is not empty. In fact, it has many
    records which I can see plainly on the screen. But when I do response.write
    rs.recordcount, it just shows -1


    middletree Guest

  2. #2

    Default Re: recordcount -1

    [url]http://www.aspfaq.com/2193[/url]

    Ray at work

    "middletree" <middletreehtomail.com> wrote in message
    news:eGxmhPzkDHA.3504TK2MSFTNGP11.phx.gbl...
    > I'm simply trying to get a number of records returned in a recordset, and
    > just get a -1. I have looke din a few books and other references, can't
    > seem to find any answers. Anyone have any idea why I can't get a real
    > number? For the record, the recordset is not empty. In fact, it has many
    > records which I can see plainly on the screen. But when I do
    response.write
    > rs.recordcount, it just shows -1
    >
    >

    Ray at Guest

  3. #3

    Default Re: recordcount -1

    "middletree" <middletreehtomail.com> wrote in message
    news:eGxmhPzkDHA.3504TK2MSFTNGP11.phx.gbl...
    > I'm simply trying to get a number of records returned in a recordset, and
    > just get a -1. I have looke din a few books and other references, can't
    > seem to find any answers. Anyone have any idea why I can't get a real
    > number? For the record, the recordset is not empty. In fact, it has many
    > records which I can see plainly on the screen. But when I do
    response.write
    > rs.recordcount, it just shows -1
    [url]http://www.aspfaq.com/show.asp?id=2193[/url]

    --
    Tom Kaminski IIS MVP
    [url]http://www.iistoolshed.com/[/url] - tools, scripts, and utilities for running IIS
    [url]http://mvp.support.microsoft.com/[/url]
    [url]http://www.microsoft.com/windowsserver2003/community/centers/iis/[/url]



    Tom Kaminski [MVP] Guest

  4. #4

    Default Re: recordcount -1

    That did it; thanks


    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:uplPESzkDHA.2216TK2MSFTNGP12.phx.gbl...
    > [url]http://www.aspfaq.com/2193[/url]
    >
    > Ray at work
    >
    > "middletree" <middletreehtomail.com> wrote in message
    > news:eGxmhPzkDHA.3504TK2MSFTNGP11.phx.gbl...
    > > I'm simply trying to get a number of records returned in a recordset,
    and
    > > just get a -1. I have looke din a few books and other references, can't
    > > seem to find any answers. Anyone have any idea why I can't get a real
    > > number? For the record, the recordset is not empty. In fact, it has
    many
    > > records which I can see plainly on the screen. But when I do
    > response.write
    > > rs.recordcount, it just shows -1
    > >
    > >
    >
    >

    middletree Guest

  5. #5

    Default Re: recordcount -1

    Alternatively, look at using .GetRows() if you also need the data, rather
    than executing two queries.

    ..getRows places your Recordset data into a VBScript array. Then you can use
    the UBound() function to work out how many records there are.

    Cheers
    Ken

    "middletree" <middletreehtomail.com> wrote in message
    news:%23iujuN0kDHA.3024tk2msftngp13.phx.gbl...
    : That did it; thanks
    :
    :
    : "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    : news:uplPESzkDHA.2216TK2MSFTNGP12.phx.gbl...
    : > [url]http://www.aspfaq.com/2193[/url]
    : >
    : > Ray at work
    : >
    : > "middletree" <middletreehtomail.com> wrote in message
    : > news:eGxmhPzkDHA.3504TK2MSFTNGP11.phx.gbl...
    : > > I'm simply trying to get a number of records returned in a recordset,
    : and
    : > > just get a -1. I have looke din a few books and other references,
    can't
    : > > seem to find any answers. Anyone have any idea why I can't get a real
    : > > number? For the record, the recordset is not empty. In fact, it has
    : many
    : > > records which I can see plainly on the screen. But when I do
    : > response.write
    : > > rs.recordcount, it just shows -1
    : > >
    : > >
    : >
    : >
    :
    :


    Ken Schaefer Guest

  6. #6

    Default Re: recordcount -1

    That's a nice FAQ Ray.

    Some day I must try and see if you have a searchable index [XML hopefully] I
    can periodically [read 'automagically'] get hold of and put on my intranet /
    website.

    Chris.


    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:uplPESzkDHA.2216TK2MSFTNGP12.phx.gbl...
    [url]http://www.aspfaq.com/2193[/url]

    Ray at work

    "middletree" <middletreehtomail.com> wrote in message
    news:eGxmhPzkDHA.3504TK2MSFTNGP11.phx.gbl...
    > I'm simply trying to get a number of records returned in a recordset, and
    > just get a -1. I have looke din a few books and other references, can't
    > seem to find any answers. Anyone have any idea why I can't get a real
    > number? For the record, the recordset is not empty. In fact, it has many
    > records which I can see plainly on the screen. But when I do
    response.write
    > rs.recordcount, it just shows -1
    >
    >


    Chris Barber Guest

  7. #7

    Default Re: recordcount -1

    It's not my site!!! [url]http://www.aspfaq.com/credits.asp[/url] But you're right.
    It's an outstanding FAQ site...

    Ray at work

    "Chris Barber" <chrisblue-canoe.co.uk.NOSPAM> wrote in message
    news:ObbInf8kDHA.2772TK2MSFTNGP12.phx.gbl...
    > That's a nice FAQ Ray.
    >
    > Some day I must try and see if you have a searchable index [XML hopefully]
    I
    > can periodically [read 'automagically'] get hold of and put on my intranet
    /
    > website.
    >
    > Chris.

    Ray at Guest

  8. #8

    Default Re: recordcount -1

    Since you're always posting the FAQ ref's, I thought it was your site!
    I had a vision of you knowing every FAQ number off by heart and just quoting
    them ad hoc in the relevant posts.

    LoL.

    Chris.

    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:ex1UzS%23kDHA.2456TK2MSFTNGP09.phx.gbl...
    It's not my site!!! [url]http://www.aspfaq.com/credits.asp[/url] But you're right.
    It's an outstanding FAQ site...

    Ray at work

    "Chris Barber" <chrisblue-canoe.co.uk.NOSPAM> wrote in message
    news:ObbInf8kDHA.2772TK2MSFTNGP12.phx.gbl...
    > That's a nice FAQ Ray.
    >
    > Some day I must try and see if you have a searchable index [XML hopefully]
    I
    > can periodically [read 'automagically'] get hold of and put on my intranet
    /
    > website.
    >
    > Chris.


    Chris Barber Guest

  9. #9

    Default Re: recordcount -1

    Heh. I think I accuse Aaron of the same thing before. No, I link that that
    site all the time because I think 95% of what I know came from there. Don't
    forget to click the paypal link. :]

    Ray at work

    "Chris Barber" <chrisblue-canoe.co.uk.NOSPAM> wrote in message
    news:u9OMJi%23kDHA.708TK2MSFTNGP10.phx.gbl...
    > Since you're always posting the FAQ ref's, I thought it was your site!
    > I had a vision of you knowing every FAQ number off by heart and just
    quoting
    > them ad hoc in the relevant posts.
    >
    > LoL.
    >
    > Chris.
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:ex1UzS%23kDHA.2456TK2MSFTNGP09.phx.gbl...
    > It's not my site!!! [url]http://www.aspfaq.com/credits.asp[/url] But you're right.
    > It's an outstanding FAQ site...
    >
    > Ray at work
    >
    > "Chris Barber" <chrisblue-canoe.co.uk.NOSPAM> wrote in message
    > news:ObbInf8kDHA.2772TK2MSFTNGP12.phx.gbl...
    > > That's a nice FAQ Ray.
    > >
    > > Some day I must try and see if you have a searchable index [XML
    hopefully]
    > I
    > > can periodically [read 'automagically'] get hold of and put on my
    intranet
    > /
    > > website.
    > >
    > > Chris.
    >
    >
    >

    Ray at Guest

Similar Threads

  1. RecordCount Issues
    By supportcenter in forum Coldfusion Database Access
    Replies: 6
    Last Post: November 9th, 01:05 PM
  2. Indirect recordcount
    By a440guy in forum Macromedia ColdFusion
    Replies: 4
    Last Post: May 13th, 01:42 PM
  3. Getting a recordcount
    By Andy Levy in forum PHP Development
    Replies: 3
    Last Post: October 29th, 08:55 AM
  4. RecordCount Property and SQL
    By Scott in forum ASP Database
    Replies: 2
    Last Post: July 22nd, 01:17 PM
  5. Why does the RecordCount property always = -1
    By George Mizzell in forum Macromedia Dreamweaver
    Replies: 2
    Last Post: July 13th, 01:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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