Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding a record in an ado recordset
Message
 
À
24/09/1999 03:48:16
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00268379
Message ID:
00268412
Vues:
22
>I have filled a listview from a recordset.
>when a user search trough the listview and presses enter i want to
>find that specific record in he recordset .
>all my nodes have in the tag propertie the primary key of the table
>so i want to find this primary key in my ado recordset
>i saw that there is a find function in ado but i don't know if that is
>the one i want .
>
>Has Anybody a suggestion
>
>David van der Vliet

Find is usually used when you have multiple value corresponding to your search. Once your first Find is done, you can "Find" again to retrieve the next corresponding value.

If you're looking for the primary key, you would better use the Seek method.

Seek will work if you have those requirements:
-ADO 2.1 or later.
-Client side recordset (CursorLocation property equal to adUseClient).

Seek will be fastest by far since it use index to retrieve the value.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform