AdoServer:Find()

<< Click to Display Table of Contents >>

Navigation:  Dataservers > AdoServer Class >

AdoServer:Find()

Previous pageReturn to chapter overviewNext page

Purpose

Searches a Recordset for the row that satisfies the specified criteria.

 

Prototype

METHOD Find ( cCriteria, lSkipRecs, lSearchDir, oStart ) CLASS AdoServer

 

 

Argument(s)

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.

 

 

Argument(s)

lResult        (LOGIC) inidicating that the last search did not hit EOF or BOF (with adSearchBackward)

 

Notifications

The Find() method starts with a NOTIFYINTENTTOMOVE and sends a NOTIFYRECORDCHANGE when completed

 

 

Note        AdoServer:Find() also sets the AdoServer:Found flag

 

 

Example(s)

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)

 

 

See Also

AdoServer, AdoRecordset:Find(), AdoSearchDirectionEnum, AdoServer:Found