Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding a record in an ado recordset
Message
 
To
24/09/1999 03:48:16
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00268379
Message ID:
00268412
Views:
21
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform