>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