Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Easy one for you...
Message
From
04/06/2001 07:02:45
 
 
To
04/06/2001 06:16:32
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00514460
Message ID:
00514470
Views:
15
>Could someone please tell me how I return the number of records in my ADO recordset?? The recordcount property only returns -1. I am presuming I need to choose another library or use an SQL statement to determine the number of records...If anyone has a solution I would be extremely grateful. Thanks, Paul


If you do a MoveLast, you'll have the correct recordcount. Needless to say, this is not efficient.

You can do a SQL query using SELECT COUNT. The downside is that you ad another hit to you database (a fast one it is).
Guy Barrette, MCSD
============
Blog http://weblogs.asp.net/guybarrette
Microsoft Regional Director, Montreal, Canada www.microsoft.com/rd
MVP, ASP.NET http://mvp.support.microsoft.com/
President, Montreal Visual Studio User Group www.guvsm.net
INETA Regional Rep for Quebec www.ineta.org
UniversalThread Magazine Columnist (.NET Books Review Column) www.utmag.com
Tech Chair French Track, DevTeach 2004 & 2005 www.devteach.com
Business Architect, Microsoft Team - Nurun Inc www.nurun.com
XBox Live Gamer Tag: Slomo QC CA
Previous
Reply
Map
View

Click here to load this message in the networking platform