Ask a Question related to ASP Database, Design and Development.
-
Scott #1
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 SQL database, the RecordCount always
returns -1
Is there another quick way to get the Record Count with SQL so I could run a
similiar statement?
Scott Guest
-
RecordCount & Grouping, I think?
Hi all, I'm hoping someone here will be able to help me out with a little query that I've not been able to get working (and I've asked on two... -
recordCount property
hi. i'm using Mach II to build my app but i have a question about the recordCount property of a query object. i'm performing login validation... -
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;... -
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... -
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... -
Aaron Bertrand [MVP] #2
Re: RecordCount Property and SQL
[url]http://www.aspfaq.com/2193[/url]
--
Aaron Bertrand, SQL Server MVP
[url]http://www.aspfaq.com/[/url]
Please reply in the newsgroups, but if you absolutely
must reply via e-mail, please take out the TRASH.
"Scott" <salexbailey@msn.com> wrote in message
news:eRxx3v9TDHA.2092@TK2MSFTNGP10.phx.gbl...a> 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 SQL database, the RecordCount always
> returns -1
>
>
> Is there another quick way to get the Record Count with SQL so I could run> similiar statement?
>
>
Aaron Bertrand [MVP] Guest
-
Bob Barrows #3
Re: RecordCount Property and SQL
Scott wrote:
In addition to Aaron's article, you should be aware that using a client-side> 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 SQL database, the RecordCount always
> returns -1
>
>
> Is there another quick way to get the Record Count with SQL so I
> could run a similiar statement?
cursor will be more expensive in terms of resources and performance than the
default server-side forward-only cursor. You should consider using GetRows
to stuff your data into an array so you can forego the recordset loop and do
a much faster array loop instead. This has the added benefit of allowing you
to immediately close your recordset and connection, allowing the connection
to be used by another user which can also boost your overall performance and
scalability.
Bob Barrows
Bob Barrows Guest



Reply With Quote

