Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: difference between filter,find and seek?
Seek and Find methods do the same thing: they search for some record in a table.
Seek method is rarely used, and it has some limitations:
1) server-side cursor must be used for CursorLocation property
2) recordset must be opened with adCmdTableDirect parameter. this means that you cant use seek for queris, linked tables....
3) the provider must support indexes
4) I think (not sure) it can be used only on access databases, because of the 3rd limitation...
Very few providers implemet this method. If you want to check whether the provider supports this method, you will need to check if it supports both adSeek and adIndex.
On the other hand, Find method is implemented by mosdt providers and widely used. In order to work, provider needs to implement Bookmark property, so to check if it supports this method, you would need to check if it supports adBookmark.
Opposite to this two mehtods mentioned above, which after executed point to only one record, filter property can return multiple records that match the criteria. There are some limitations to using this method, that consider criteria parameter. You should check for the MSDN article, where it gives example of what criterias can be used and what cannot.
____________________________
If you find the answer helpful, please mark this topic as solved.
|