<< Click to Display Table of Contents >> AdoServer:Find() |
![]() ![]() ![]() |
Searches a Recordset for the row that satisfies the specified criteria.
METHOD Find ( cCriteria, lSkipRecs, lSearchDir, oStart ) CLASS AdoServer
cCriteria A String containing a statement that specifies the column name, comparison operator, and value to use in the search.
lSkipRecs (Optional) A Long (default =zero), the row offset from the current row or start bookmark to begin the search.
lSearchDir (Optional) A SearchDirectionEnum value. Default = adSearchForward
oStart (Optional) A bookmark that functions as the starting position for the search.
lResult (LOGIC) inidicating that the last search did not hit EOF or BOF (with adSearchBackward)
The Find() method starts with a NOTIFYINTENTTOMOVE and sends a NOTIFYRECORDCHANGE when completed
Note AdoServer:Find() also sets the AdoServer:Found flag
strCnn := "Provider=sqloledb;" + ;
"Data Source=cpserver;Initial Catalog=pubs;User Id=sa;Password=; "
oConn := AdoConnection
// Set the default connection for better error reports
AdoSetConnection(oConn)
oConn:CursorLocation := adUseClient
oConn:Open(strCnn,NIL,NIL,NIL)
oSrv := AdoServer"employee",oConn,adOpenKeySet,NIL,adCmdTable
? oSrv:Find("lname like 'b*', 0, AdSearchForward)
AdoServer, AdoRecordset:Find(), AdoSearchDirectionEnum, AdoServer:Found