Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Re: Recordcount in Oracle


Message #1 by "Drew, Ron" <RDrew@B...> on Mon, 13 May 2002 13:04:10 -0400
Yes, this will work also but I believe getrows is faster.  Depends on
the size of the db table...6 or half dozen still gives the same answer.

-----Original Message-----
From: Jr Tumamao [mailto:jrtumamao@h...]
Sent: Monday, May 13, 2002 10:32 AM
To: ASP Databases
Subject: [asp_databases] Re: Recordcount in Oracle


hi,

or you can also do something like this...

if not objrs.eof or not objrs.eof then
    objrs.movelast
    recordcount =3D objrs.recordcount
end if .

----- Original Message -----
From: <imran.saleem@b...>
To: "ASP Databases" <asp_databases@p...>
Sent: Monday, May 13, 2002 1:35 PM
Subject: [asp_databases] Recordcount in Oracle


> Hi,
>    could somebody please tell me how to retrieve the number of records

> in a recordset using an Oracle DB. I have used the obvious:
>
> 'Dim RecordCount
> RecordCount =3D objRS.RecordCount'
>
> But it returns -1.
>
> I am using an SQL statement to query the DB.
> I know there are posts relasted to this topic but none really that are

> relevant.
>
> Thanks for your help.
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or to
> unsubscribe send a blank email to
>

Message #2 by "Jr Tumamao" <jrtumamao@h...> on Mon, 13 May 2002 08:32:12 -0600
hi,

or you can also do something like this...

if not objrs.eof or not objrs.eof then
    objrs.movelast
    recordcount = objrs.recordcount
end if .

----- Original Message -----
From: <imran.saleem@b...>
To: "ASP Databases" <asp_databases@p...>
Sent: Monday, May 13, 2002 1:35 PM
Subject: [asp_databases] Recordcount in Oracle


> Hi,
>    could somebody please tell me how to retrieve the number of records in
> a recordset using an Oracle DB. I have used the obvious:
>
> 'Dim RecordCount
> RecordCount = objRS.RecordCount'
>
> But it returns -1.
>
> I am using an SQL statement to query the DB.
> I know there are posts relasted to this topic but none really that are
> relevant.
>
> Thanks for your help.
>
Message #3 by Colin.Montgomery@C... on Mon, 13 May 2002 13:42:48 +0100
depending on the recorset type, the .recordcount property isn't set until
you do a .movelast

This is the case for Access and MS SQL, but I assume it's the same for
Oracle.

HTH,
Col


*******

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.  If you are not the
intended recipient, please telephone or email the sender and delete this message and any attachment from your system.  If you are
not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

For further information about Clifford Chance please see our website at http://www.cliffordchance.com or refer to any Clifford
Chance office.

Message #4 by imran.saleem@b... on Mon, 13 May 2002 13:35:24
Hi,
   could somebody please tell me how to retrieve the number of records in 
a recordset using an Oracle DB. I have used the obvious:

'Dim RecordCount
RecordCount = objRS.RecordCount'

But it returns -1.

I am using an SQL statement to query the DB.
I know there are posts relasted to this topic but none really that are 
relevant. 

Thanks for your help.
Message #5 by "Drew, Ron" <RDrew@B...> on Mon, 13 May 2002 08:42:18 -0400
objRS.Open "SELECT * FROM Table1", objConn
objRS.GetRows

-----Original Message-----
From: imran.saleem@b... [mailto:imran.saleem@b...]
Sent: Monday, May 13, 2002 9:35 AM
To: ASP Databases
Subject: [asp_databases] Recordcount in Oracle


Hi,
   could somebody please tell me how to retrieve the number of records
in
a recordset using an Oracle DB. I have used the obvious:

'Dim RecordCount
RecordCount =3D objRS.RecordCount'

But it returns -1.

I am using an SQL statement to query the DB.
I know there are posts relasted to this topic but none really that are
relevant.

Thanks for your help.

  Return to Index