ADO Recordcount -1 ?

ADO Recordcount -1 ?

Post by Luqma » Sat, 13 Apr 2002 05:12:00



Using Oracle Queries in ADO Recordset with Cursorlocation =adUseServer, the
recordcount is -1.

How can I get the recordcount.

I don't want to set the Cursorlocation =adUseClient as
it makes the query very slow.

Best Regards,

Luqman

 
 
 

ADO Recordcount -1 ?

Post by Mike Collie » Sat, 13 Apr 2002 06:27:55


Select count(*) from myTable

--
Michael Collier Bsc (Hons)

Interactive ADO Object Browser (Free Trial) www.adoanywhere.com
Free ADO Browser (FAB)  www.adoanywhere.com/fab
Home Page www.adoanywhere.com

--


Quote:> Using Oracle Queries in ADO Recordset with Cursorlocation =adUseServer,
the
> recordcount is -1.

> How can I get the recordcount.

> I don't want to set the Cursorlocation =adUseClient as
> it makes the query very slow.

> Best Regards,

> Luqman


 
 
 

ADO Recordcount -1 ?

Post by Val Mazu » Sat, 13 Apr 2002 20:13:24


Hi,

RecordCount propert depends on cursor location, cursor
settings and other provider capabilities to return actual
record count. So it is not reliable way. You could execute
separate SQL statement o find out record count

SELECT COUNT(*) from TableName .....

Val

Quote:>-----Original Message-----
>Using Oracle Queries in ADO Recordset with Cursorlocation
=adUseServer, the
>recordcount is -1.

>How can I get the recordcount.

>I don't want to set the Cursorlocation =adUseClient as
>it makes the query very slow.

>Best Regards,

>Luqman

>.

 
 
 

1. DAO Recordcount vs. ADO Recordcount

In DAO, to get a correct Recordcount, you had to do a movelast and a
movefirst of the recordset before you could use the recordcount.

Is this also necessary in ADO?

Many thanks and greetings from Brugge (Bruges - Belgium),

Michel

2. !US - Seattle, WA - Sr. System Architect

3. ADO RecordCount Doesn't work???

4. 9i Database Configuration Assistant hangs on windows 98

5. ADO recordcount returning -1

6. Merging IDAPI32.CFG

7. ADO recordcount

8. Btrieve ODBC problems

9. Connection failure and ado recordcount property

10. ADO recordcount

11. SQL Count vs. ADO RecordCount

12. Problem with ADO RecordCount and RecordsAffected

13. ADO - RecordCount returns -1