To set property values, a consumer performs the following actions:
If the property belongs to the Rowset property group and applies to a single column, the consumer sets the colid element of the DBPROP structure to the ID of the column.
For example, assume that the consumer wants to set values for five properties, where properties 1, 2, and 3 are in property set A and properties 4 and 5 are in property set B. The consumer uses the following structures.
An example of setting property values
The following table lists the methods that consumers use to set property values.
Methods used by consumer to set property values
Property group | Methods used to set property values |
Column | ITableDefinition::CreateTable |
Data Source | IDBProperties::SetProperties |
Data Source Creation | IDBDataSourceAdmin::CreateDataSource |
Data Source Information | IDBProperties::SetProperties |
Initialization | IDBProperties::SetProperties |
Index | IIndexDefinition::CreateIndex |
Rowset | IColumnsRowset::GetColumnsRowset, ICommandProperties::SetProperties, IDBSchemaRowset::GetRowset, IOpenRowset::OpenRowset, ISourcesRowset::GetSourcesRowset, ITableDefinition::CreateTable |
Session | ISessionProperties::SetProperties |
Table | ITableDefinition::CreateTable |
Read-only properties can always be set to their default values or to VT_EMPTY. Setting read-only properties to any other values will cause an error.