Ask a Question related to ASP, Design and Development.

  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. Similar Questions and Discussions

    1. RecordCount Issues
      Hi folks! Long story short: Within the application, which I'm developing ATM, I have to do some update- and delete-queries, but it seems that...
    2. Indirect recordcount
      I have a variable that contains the name of a query. How can I get the RecordCount for that query? I've tried using Evaluate() in several...
    3. Getting a recordcount
      Hi I have opened a database in PHP and would like to know whether a particular record exists. i.e. $ThisUsername = $_REQUEST;...
    4. RecordCount Property and SQL
      When using an access database, I could retrieve the recordcount with code below For r = 1 to RS.RecordCount When I try the same syntax on a...
    5. Why does the RecordCount property always = -1
      I have a working set of data coming back from my database without any problems. I am trying to add a textbox to each row of repeated data and...
  3. #2

    Default Re: recordcount -1

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

    Ray at work

    "middletree" <middletree@htomail.com> wrote in message
    news:eGxmhPzkDHA.3504@TK2MSFTNGP11.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

  4. #3

    Default Re: recordcount -1

    "middletree" <middletree@htomail.com> wrote in message
    news:eGxmhPzkDHA.3504@TK2MSFTNGP11.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

  5. #4

    Default Re: recordcount -1

    That did it; thanks


    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:uplPESzkDHA.2216@TK2MSFTNGP12.phx.gbl...
    > [url]http://www.aspfaq.com/2193[/url]
    >
    > Ray at work
    >
    > "middletree" <middletree@htomail.com> wrote in message
    > news:eGxmhPzkDHA.3504@TK2MSFTNGP11.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

  6. #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" <middletree@htomail.com> wrote in message
    news:%23iujuN0kDHA.3024@tk2msftngp13.phx.gbl...
    : That did it; thanks
    :
    :
    : "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    : news:uplPESzkDHA.2216@TK2MSFTNGP12.phx.gbl...
    : > [url]http://www.aspfaq.com/2193[/url]
    : >
    : > Ray at work
    : >
    : > "middletree" <middletree@htomail.com> wrote in message
    : > news:eGxmhPzkDHA.3504@TK2MSFTNGP11.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

  7. #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.2216@TK2MSFTNGP12.phx.gbl...
    [url]http://www.aspfaq.com/2193[/url]

    Ray at work

    "middletree" <middletree@htomail.com> wrote in message
    news:eGxmhPzkDHA.3504@TK2MSFTNGP11.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

  8. #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" <chris@blue-canoe.co.uk.NOSPAM> wrote in message
    news:ObbInf8kDHA.2772@TK2MSFTNGP12.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

  9. #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.2456@TK2MSFTNGP09.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" <chris@blue-canoe.co.uk.NOSPAM> wrote in message
    news:ObbInf8kDHA.2772@TK2MSFTNGP12.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

  10. #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" <chris@blue-canoe.co.uk.NOSPAM> wrote in message
    news:u9OMJi%23kDHA.708@TK2MSFTNGP10.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.2456@TK2MSFTNGP09.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" <chris@blue-canoe.co.uk.NOSPAM> wrote in message
    > news:ObbInf8kDHA.2772@TK2MSFTNGP12.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

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