OLEDBSimpleProvider::find

Searches for a set of values specified in varSval, in column iColumn starting at iRow. Upon successful completion, the row number with the matching value is returned in piRowFound.

HRESULT find (
LONGiRowStart,
LONGiColumn,
VARIANTvarSval,
OSPFINDfindFlags,
OSPCOMPcompType,
LONG*piRowFound);

Parameters

iRowStart

[in]
Position of the first row of the data set at which the search operation begins.

iColumn

[in]
Position of the first column of the data set at which the search operation begins.

varSvalt

[in]
The target value or values of the search operation.

findFlags

[in]
An enumeration consisting of the following values:

Value Meaning
OSPFIND_DEFAULT = 0 Specifies that the search operation should be in ascending order through rows in a case-insensitive manner.
OSPFIND_UP = 1 Specifies that the search operation should be in descending order through rows.
OSPFIND_CASESENSITIVE = 2 Specifies case-sensitivity for the search.
OSPFIND_UPCASESENSITIVE = 3 Specifies that the search operation should be in ascending order through rows in a case-sensitive manner.

compType

[in]
An enumeration consisting of the following values:

Value Meaning
OSPCOMP_EQ = 1
OSPCOMP_DEFAULT = 1
Specifies that the search is for the first value equal to varSval.
OSPCOMP_LT = 2 Specifies that the search is for the first value less than varSval.
OSPCOMP_LE = 3 Specifies that the search is for the first value less than or equal to varSval.
OSPCOMP_GE = 4 Specifies that the search is for the first value greater than or equal to varSval.
OSPCOMP_GT = 5 Specifies that the search is for the first value greater than varSval.
OSPCOMP_NE = 6 Specifies that the search is for the first value not equal to varSval.

piRowFound

[out]
The number of the row containing the matching value of the search. If no corresponding match is found, find should return the constant -1.

Return Codes

S_OK
The method succeeded.

DISP_E_TYPEMISMATCH

The provider was unable to match the type of the varSval to the underlying type of the column.

E_FAIL
A provider-specific error occurred.

Notes