Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > recordcount -1

Reply
Thread Tools

recordcount -1

 
 
middletree
Guest
Posts: n/a
 
      10-15-2003
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


 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      10-15-2003
http://www.aspfaq.com/2193

Ray at work

"middletree" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Tom Kaminski [MVP]
Guest
Posts: n/a
 
      10-15-2003
"middletree" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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/windowsserv...y/centers/iis/



 
Reply With Quote
 
middletree
Guest
Posts: n/a
 
      10-15-2003
That did it; thanks


"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:(E-Mail Removed)...
> http://www.aspfaq.com/2193
>
> Ray at work
>
> "middletree" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Ken Schaefer
Guest
Posts: n/a
 
      10-16-2003
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
: That did it; thanks
:
:
: "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
: news:(E-Mail Removed)...
: > http://www.aspfaq.com/2193
: >
: > Ray at work
: >
: > "middletree" <(E-Mail Removed)> wrote in message
: > news:(E-Mail Removed)...
: > > 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
: > >
: > >
: >
: >
:
:


 
Reply With Quote
 
Chris Barber
Guest
Posts: n/a
 
      10-16-2003
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:(E-Mail Removed)...
http://www.aspfaq.com/2193

Ray at work

"middletree" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>




 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      10-16-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.



 
Reply With Quote
 
Chris Barber
Guest
Posts: n/a
 
      10-16-2003
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%(E-Mail Removed)...
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.




 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      10-16-2003
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" <(E-Mail Removed)> wrote in message
news:u9OMJi%(E-Mail Removed)...
> 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%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.

>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NEWBIE: RecordCount of SqlDataSource Daan ASP .Net 4 03-18-2009 11:04 AM
datasource.recordcount? How to obtain this? =?Utf-8?B?YmVybmFkb3U=?= ASP .Net 7 02-09-2006 05:57 PM
DataReader and RecordCount =?Utf-8?B?UGF1bA==?= ASP .Net 9 10-22-2005 10:46 AM
dataset recordcount returned via function drdave@canoemail.com ASP .Net 2 10-13-2005 03:51 PM
RecordCount of a datareader Steve Caliendo ASP .Net 1 06-02-2004 03:31 PM



Advertisments