MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 14: Properties


 

DBPROPSTATUS Enumerated Type

Providers use DBPROPSTATUS values to return information about whether property values could be set. DBPROPSTATUS is used in the DBPROP structure.

The values of DBPROPSTATUS have the following meanings.

Value Description
DBPROPSTATUS_OK The property's value was successfully set. This includes the case where the value of a read-only property was set to its current value.
DBPROPSTATUS_BADCOLUMN The colid element of the DBPROP structure was invalid.
DBPROPSTATUS_BADOPTION The value of dwOptions was invalid.
DBPROPSTATUS_BADVALUE The data type in vValue was not the data type of the property or was not VT_EMPTY. For example, the property was DBPROP_MEMORYUSAGE, which has a data type of VT_I4, and the data type was VT_I8.

The value in vValue was not a valid value. For example, the property was DBPROP_MEMORYUSAGE and the value was negative.

The value in vValue was a valid value for the property and the provider supports the property as a settable property, but the provider does not support the value specified by vValue. This includes the case where the value was added to the property in OLE DB after the provider was written. (See DBPROPSTATUS_NOTSUPPORTED in this table.)

DBPROPSTATUS_CONFLICTING The property's value was not set because doing so would have conflicted with an existing property.

This value is returned when a property is set that conflicts with the read-only state of a rowset—for example, a schema rowset.

DBPROPSTATUS_NOTALLSETTABLE A property was specified to be applied to all columns but could not be applied to one or more of them.
DBPROPSTATUS_NOTSET The property's value was not set to the specified value because dwOptions was DBPROPOPTIONS_OPTIONAL and setting the property to the specified value was not possible.
DBPROPSTATUS_NOTSETTABLE The property was read-only, or the consumer attempted to set values of properties in the Initialization property group after the data source object was initialized. Consumers can set the value of a read-only property to its current value. This value is also returned if a settable column property could not be set for the particular column.
DBPROPSTATUS_NOTSUPPORTED The property's value was not set because the provider did not support the property, the provider did not support the property set, or the consumer attempted to get or set values of properties not in the Initialization property group and the data source object is uninitialized.

The provider can return DBPROPSTATUS_NOTSUPPORTED for properties that do not apply to the provider. For example, a read-only provider might always return DBPROPSTATUS_NOTSUPPORTED if the consumer called IDBProperties::GetPropertyInfo for DBPROP_UPDATABILITY.

Note   Some providers return DBPROPSTATUS_NOTSUPPORTED in cases where the value in vValue was a valid value for the property and the provider supports the property as a settable property but the provider does not support the value specified by vValue. Although this is not a programming error, providers are encouraged to return DBPROPSTATUS_BADVALUE for all such cases. This is partly for forward compatibility. When new values are added to an existing property in OLE DB, existing providers should return DBPROPSTATUS_BADVALUE for those values (rather than DBPROPSTATUS_NOTSUPPORTED, which might give the false impression that the property is no longer supported).