virtual BOOL Find( long lFindType, LPCTSTR lpszFilter );
throw( CDaoException, CMemoryException );
Return Value
Nonzero if matching records are found, otherwise 0.
Parameters
lFindType
A value indicating the type of Find operation desired. The possible values are:
lpszFilter
A string expression (like the WHERE clause in an SQL statement without the word WHERE) used to locate the record. For example:
Find(AFX_DAO_FIRST, "colRecID = 7")
Find(AFX_DAO_NEXT, "customerName = 'Jones'")
Remarks
Call this member function to locate a particular string in a dynaset- or snapshot-type recordset using a comparison operator. You can find the first, next, previous, or last instance of the string. Find is a virtual function, so you can override it and add your own implementation. The FindFirst, FindLast, FindNext, and FindPrev member functions call the Find member function, so you can use Find to control the behavior of all Find operations.
To locate a record in a table-type recordset, call the Seek member function.
Tip The smaller the set of records you have, the more effective Find will be. In general, and especally with ODBC data, it is better to create a new query that retrieves just the records you want.
For more information about finding records, see the article DAO Recordset: Recordset Navigation in Visual C++ Programmer's Guide. For related information, see the topic "FindFirst, FindLast, FindNext, FindPrevious Methods" in DAO Help.
CDaoRecordset Overview | Class Members | Hierarchy Chart
See Also CDaoRecordset::FindFirst, CDaoRecordset::FindLast, CDaoRecordset::FindNext, CDaoRecordset::FindPrev