LOTUS CONNECTORS


LocateRow method
Example

Identifies records that match a specified field value.

Defined in

ODBCResultSet

Syntax

status = odbcResultSet.LocateRow( column_id% or column_Name$ , value ,
[ column_id2% or column_Name2$ , value2 , [column_id3% or column_Name3$ , value3 ] ] )

Parameters

column_id%


column_Name$
value
Return value

status


Usage

Specify the column_id% or the column_Name$, as well as the value you want to match. Specify up to three pairs of the two parameters. Specify the value argument as Null to search for a null value.

This method searches forward through the result set for a value in a column beginning at the current row. If the current row matches the search criteria, the row pointer stays positioned there. To make repeated locates or to locate the next occurrence beyond the current row, use the NextRow method before LocateRow. To start at the beginning of the result set, use the FirstRow method before LocateRow. Then if the first row matches the criteria, LocateRow finds it. In a loop, make sure NextRow is valid before testing LocateRow again; otherwise, you loop infinitely on the last valid row. If CacheLimit is set, the row position after a failed LocateRow is unpredictable.

The search is case- and accent-independent. You cannot use expressions to perform advanced conditional searches. Use GetError to examine errors. LocateRow does not match values in deleted rows.

Errors

Cannot access requested row (DBstsCARR)

End of data has been reached (DBstsEOFD)

The result contains no data (DBstsNODA)

Events

BeforeLocateRow

AfterLocateRow

BeforeRowPositionChange

AfterRowPositionChange

Example
See Also