FindB

Purpose
Used to find the index number of a record containing specified data.

Syntax (Read-Only Property)
Long = object.Find(Data, Options)

Parameters
Data (Byte Array)   The data to search for.
Options (rtCDP_FindOptions [Long])   A value from the ENum rtCDP_FindOptions that affects that way the search is performed.

Return Value
Long (Long)  

The is the record number of the record matching the search criteria.

This value is zero-based.

Notes
If a record is found that matches the search criteria, the property returns the record number of the matching record.

If no record is found that matches the search criteria, the property returns -1.

If Options enters as an invalid value, the property returns -1.

If an error occurs, the property returns -1.

If Data is passed a zero-length byte array, the property will return the record number of the first record containing a zero-length byte array. This property does not assume that a zero-length byte array matches any record in the database like some database systems do.

Error Values
After calling this function, the property ErrorNumber will report one of the following values:

rtCDP_ErrNoError
rtCDP_ErrDataTooLong
rtCDP_ErrRecordNotFound
rtCDP_ErrInvalidOptions

Example
See Find.

Version History
1.0 2/21/2001 Tested

See Also
Find, FindArray, FindArrayB