Index Properties

The DBPROPSET_INDEX property set contains the following properties. All of these properties are in the INDEX property group.

Property ID Description
DBPROP_INDEX_AUTOUPDATE Type: VT_BOOL

Typical R/W: R Only

Description: Auto Update

Specifies whether the index is maintained automatically when changes are made to the corresponding base table, that is:

  • VARIANT_TRUE, which indicates that the index is automatically maintained.

  • VARIANT_FALSE, which indicates that the index must be maintained by the consumer through explicit calls to IRowsetChange.

It is the consumer’s responsibility to ensure consistency of the index as a result of updates to the associated base table.

DBPROP_INDEX_CLUSTERED Type: VT_BOOL

Typical R/W: R Only

Description: Clustered

Specifies whether an index can cluster, that is:

  • VARIANT_TRUE, which indicates that the leaf nodes of the index contain full rows, not bookmarks. This is a way to represent a table clustered by key values.

  • VARIANT_FALSE, which indicates that the leaf nodes of the index contain bookmarks relating to the base table rows whose key values match the key values of the index entry.
DBPROP_INDEX_FILLFACTOR Type: VT_BSTR

Typical R/W: R/W

Description: Fill Factor

For a B+-tree index, this property represents the storage use of page nodes during the creation of the index. The value is an integer, from 1 to 100, that represents the percentage of use of an index node. For a linear hash index, this property represents the storage use of the entire hash structure (the ratio of the used area to the total allocated area) before expansion of file structures occurs.

DBPROP_INDEX_INITIALSIZE Type: VT_I4

Typical R/W: R Only

Description: Initial Size

Specifies the total number of bytes allocated to this structure at creation time.

DBPROP_INDEX_NULLCOLLATION Type: VT_I4

Typical R/W: R Only

Description: NULL Collation

Specifies how null values are collated in the index, that is:

  • DBPROPVAL_NC_END, which indicates that null values are collated at the end of the list, regardless of the collation order.

  • DBPROPVAL_NC_START, which indicates that null values are collated at the start of the list, regardless of the collation order.

  • DBPROPVAL_NC_HIGH, which indicates that null values are collated at the high end of the list.

  • DBPROPVAL_NC_LOW, which indicates that null values are collated at the low end of the list.
DBPROP_INDEX_NULLS Type: VT_I4

Typical R/W: R/W

Description: NULL Keys

Specifies whether null keys are allowed, that is:

  • DBPROPVAL_IN_DISALLOWNULL, which indicates that the index does not allow entries where the key columns are NULL. If the consumer attempts to insert an index entry with a null key, then the provider returns an error.
DBPROP_INDEX_PRIMARYKEY Type: VT_BOOL

Typical R/W: R/W

Description: Primary Key

Specifies whether the index represents the primary key on the table.

DBPROP_INDEX_SORTBOOKMARKS Type: VT_BOOL

Typical R/W: R Only

Description: Sort Bookmarks

Specifies how the index treats repeated keys, that is:

  • VARIANT_TRUE, which indicates that the index sorts repeated keys by bookmark.

  • VARIANT_FALSE, which indicates that the index does not sort repeated keys by bookmark.
DBPROP_INDEX_TEMPINDEX Type: VT_BOOL

Typical R/W: R Only

Description: Temporary Index

Specifies whether the index is temporary, that is:

  • VARIANT_TRUE, which indicates that the index is destroyed when the session is released.

  • VARIANT_FALSE, which indicates that the index is permanent.
DBPROP_INDEX_TYPE Type: VT_I4

Typical R/W: R Only

Description: Index Type

Specifies the type of the index, that is:

  • DBPROPVAL_IT_BTREE, which indicates that the index is a B+-tree.

  • DBPROPVAL_IT_HASH, which indicates that the index is a hash file using linear or extensible hashing.

  • DBPROPVAL_IT_CONTENT, which indicates that the index is a content index.

  • DBPROPVAL_IT_OTHER, which indicates that the index is some other type of index.
DBPROP_INDEX_UNIQUE Type: VT_BOOL

Typical R/W: R/W

Description: Unique

Specifies whether index keys must be unique, that is:

  • VARIANT_TRUE, which indicates that the index keys must be unique.

  • VARIANT_FALSE, which indicates that duplicate keys are allowed.