Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Easy one for you...
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00514460
Message ID:
00514501
Vues:
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

This is actually related to the CursorType property of the recordset. If memory serves, only CursorTypes of adOpenKeyset and adOpenStatic support the RecordCount property. CursorTypes adOpenForwardOnly (the default) and adOpenDynamic do not. While adOpenForwardOnly is the most efficient CursorType, if you have to have the RecordCount it makes more sense to change the CursorType property than running a separate query to determine the number of records returned.

HTH
"It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons." - Douglas Adams
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform