OLEDBSimpleProvider::setVariant

Sets the value of the cell at the row and column indicated to the value of the variant supplied in pVar in the type requested by the value of fFormatted.

setVariant uses the following enumeration:

typedef enum OSPFORMAT {
OSPFORMAT_RAW = 0,
OSPFORMAT_DEFAULT = 0,
OSPFORMAT_FORMATTED = 1,
OSPFORMAT_HTML = 2,
};

where

Value Meaning
OSPFORMAT_RAW
OSPFORMAT_DEFAULT
Underlying column type should be used to set or get the value (the default).
OSPFORMAT_FORMATTED Underlying column type should be converted to a string, and the string returned as a BSTR within the variant.
OSPFORMAT_HTML Underlying column type should be converted to an HTML string.

HRESULT setVariant (
LONGiRow,
LONGiColumn,
OSPFORMATfFormatted,

VARIANT*pVar);

Parameters

iRow

[in]
Position of the specified row.

iColumn

[in]
Position of the specified column.

fFormatted

[in]
Enumerated value that determines the format in which to return the cell value's underlying column type (see above table).

pVar

[in/out]
Based on the value specified in the pVar parameter, pVar will contain either:

Return Codes

S_OK
The method succeeded.

E_FAIL
The value could not be set, or the provider was read-only.

Notes