recordcount -1

Discussion in 'ASP General' started by middletree, Oct 15, 2003.

  1. middletree

    middletree Guest

    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, Oct 15, 2003
    #1
    1. Advertising

  2. middletree

    Ray at Guest

    http://www.aspfaq.com/2193

    Ray at work

    "middletree" <> wrote in message
    news:...
    > 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, Oct 15, 2003
    #2
    1. Advertising

  3. "middletree" <> wrote in message
    news:...
    > 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


    http://www.aspfaq.com/show.asp?id=2193

    --
    Tom Kaminski IIS MVP
    http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
    http://mvp.support.microsoft.com/
    http://www.microsoft.com/windowsserver2003/community/centers/iis/
    Tom Kaminski [MVP], Oct 15, 2003
    #3
  4. middletree

    middletree Guest

    That did it; thanks


    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:...
    > http://www.aspfaq.com/2193
    >
    > Ray at work
    >
    > "middletree" <> wrote in message
    > news:...
    > > 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, Oct 15, 2003
    #4
  5. middletree

    Ken Schaefer Guest

    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" <> wrote in message
    news:%...
    : That did it; thanks
    :
    :
    : "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    : news:...
    : > http://www.aspfaq.com/2193
    : >
    : > Ray at work
    : >
    : > "middletree" <> wrote in message
    : > news:...
    : > > 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, Oct 16, 2003
    #5
  6. middletree

    Chris Barber Guest

    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:...
    http://www.aspfaq.com/2193

    Ray at work

    "middletree" <> wrote in message
    news:...
    > 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, Oct 16, 2003
    #6
  7. middletree

    Ray at Guest

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

    Ray at work

    "Chris Barber" <> wrote in message
    news:...
    > 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, Oct 16, 2003
    #7
  8. middletree

    Chris Barber Guest

    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%...
    It's not my site!!! http://www.aspfaq.com/credits.asp But you're right.
    It's an outstanding FAQ site...

    Ray at work

    "Chris Barber" <> wrote in message
    news:...
    > 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, Oct 16, 2003
    #8
  9. middletree

    Ray at Guest

    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" <> wrote in message
    news:u9OMJi%...
    > 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%...
    > It's not my site!!! http://www.aspfaq.com/credits.asp But you're right.
    > It's an outstanding FAQ site...
    >
    > Ray at work
    >
    > "Chris Barber" <> wrote in message
    > news:...
    > > 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, Oct 16, 2003
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Caliendo

    RecordCount of a datareader

    Steve Caliendo, Jun 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,404
    John Oakes
    Jun 2, 2004
  2. Daan
    Replies:
    4
    Views:
    15,567
    chris22smith
    Mar 18, 2009
  3. Replies:
    2
    Views:
    2,852
    Peter Rilling
    Oct 13, 2005
  4. =?Utf-8?B?UGF1bA==?=

    DataReader and RecordCount

    =?Utf-8?B?UGF1bA==?=, Oct 21, 2005, in forum: ASP .Net
    Replies:
    9
    Views:
    37,791
    Patrick.O.Ige
    Oct 22, 2005
  5. =?Utf-8?B?YmVybmFkb3U=?=

    datasource.recordcount? How to obtain this?

    =?Utf-8?B?YmVybmFkb3U=?=, Feb 9, 2006, in forum: ASP .Net
    Replies:
    7
    Views:
    3,488
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    Feb 9, 2006
Loading...

Share This Page