473,320 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
Jul 19 '05 #1
8 3954
http://www.aspfaq.com/2193

Ray at work

"middletree" <mi********@htomail.com> wrote in message
news:eG**************@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

Jul 19 '05 #2
"middletree" <mi********@htomail.com> wrote in message
news:eG**************@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


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/

Jul 19 '05 #3
That did it; thanks
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:up**************@TK2MSFTNGP12.phx.gbl...
http://www.aspfaq.com/2193

Ray at work

"middletree" <mi********@htomail.com> wrote in message
news:eG**************@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


Jul 19 '05 #4
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" <mi********@htomail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
: That did it; thanks
:
:
: "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
: news:up**************@TK2MSFTNGP12.phx.gbl...
: > http://www.aspfaq.com/2193
: >
: > Ray at work
: >
: > "middletree" <mi********@htomail.com> wrote in message
: > news:eG**************@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
: > >
: > >
: >
: >
:
:
Jul 19 '05 #5
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:up**************@TK2MSFTNGP12.phx.gbl...
http://www.aspfaq.com/2193

Ray at work

"middletree" <mi********@htomail.com> wrote in message
news:eG**************@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


Jul 19 '05 #6
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" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:Ob**************@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.

Jul 19 '05 #7
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:ex****************@TK2MSFTNGP09.phx.gbl...
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" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:Ob**************@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.


Jul 19 '05 #8
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" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:u9***************@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:ex****************@TK2MSFTNGP09.phx.gbl...
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" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:Ob**************@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.


Jul 19 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mark Watkins | last post by:
I know for a fact that in my database, I have three records under the users table. However when I execute this code: --------------BEGIN CODE---------------- Set objConn =...
2
by: Jeff Boyer | last post by:
Hello everyone, Can someone tell me why a ADO recordset.recordcount would return a -1? I have confirmed that it has records in it by writing some values to the screen. Why can't I count the...
12
by: scott | last post by:
In LISTING 2, I have a SPROC that returns a recordset and a recordcount in SQL QA. I can access the Recordset with no problem. How can I grab the Recordcount with ASP code at the same time I'm...
2
by: nick_faye | last post by:
why does my recordcount returns the # of actual records + 1? btw, i am using ms access. i don't know what happened but at first, my table seems ok. the recordcount returns the correct # of...
1
by: JMCN | last post by:
hello- i have created a tabular form using records from a specific query. then users will filter out the specific data. the next step is to take the count of the current records (daily open...
4
by: don.fleming | last post by:
Hi folks: Am doing a VBA SQL Select stmt with multiple rows found and not getting RecordCount > 1. I've verified there are multiple rows found by copying my SQL stmt from Debug window and pasting...
10
by: Robert | last post by:
How do you get an accurate count of the number of records returned from a query when using linked tables. I have an access 2003 database as a front end to another access 2003 database that...
2
by: rajvbprogramer | last post by:
here is my problem. i have two records. one containing 20 records and second containing 30 records. now i want the recordcount property to use and go to the 21 record. i m calculating the...
1
by: qqmbers | last post by:
May be it will help someone. I faced the strange problem with RecordCount property of cloned Recordset within the Current event handler. The RecordCount value was correct every time I had...
3
by: sparks | last post by:
Is recordcount a little messed or what? For Each tdf In dbs.TableDefs If Left(tdf.Name, 3) = "tbl" Then Debug.Print tdf.Name Debug.Print tdf.RecordCount it prints the correct name but the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.