-
Nov 7th, 2000, 03:47 PM
#1
Thread Starter
New Member
Hi,
How to implement the findfirst method in ado?
I want this to be present within a loop. So regardless of the earlier find, the current one should be able to start the search at the top and find a record.
Pls tell me if there is any other way other than using the movefirst method before calling find method. Note that I have to work with recordsets only.
Bye,
Sundar
-
Nov 8th, 2000, 07:03 AM
#2
Lively Member
There is a little difference between DAO and ADO when it comes to "Find" methods. I quote form MS documentation :
"DAO includes four find methods: FindFirst, FindLast, FindNext, FindPrevious. You choose which method to use based on the point from which you want to start searching (beginning, end, or curent record) and in which direction you want to search (forward or backward).
ADO has a single method: Find. Searching always begins from the current record. The Find method has parameters that allow you to specify the search direction(adSearchForward, adSearchBackward) as well as an offset from the current record at which to beginning searching (SkipRows)."
So, if you don't want to make a movefirst before searching, just set the offset to point to the begining of the recordset and then perform a forward search.
I suggest you take a visit to
http://msdn.microsoft.com/library/ps...k/mdae82eb.htm
where you'll find some good ADO vb code examples.
Surgeon
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|