Column Properties

The DBPROPSET_COLUMN property set contains the following properties. All of these properties are in the COLUMN property group.

Property ID Description
DBPROP_COL_AUTOINCREMENT Type: VT_BOOL

Typical R/W: R/W

Description: Autoincrement

Specifies whether the values of the column are autoincrementing, that is:

  • VARIANT_TRUE, which indicates the values of the column are autoincrementing.

  • VARIANT_FALSE, which indicates the values of the column are not autoincrementing.
DBPROP_COL_DEFAULT Type: Any

Typical R/W: R/W

Description: Default

A VARIANT value that specifies the default value for an object — typically a domain or column. If the default value is a string, the string must be surrounded by double quotation marks to distinguish it from an object of the same name.

DBPROP_COL_DESCRIPTION Type: VT_BSTR

Typical R/W: R/W

DBPROP_COL_FIXEDLENGTH Type: VT_BOOL

Typical R/W: R/W

Description: Fixed Length

Specifies whether a column is fixed or variable length, that is:

  • VARIANT_TRUE, which indicates the column is fixed length. ulColumnSize in the DBCOLUMNDESC structure contains the fixed-length value.

  • VARIANT_FALSE (or not specified), which indicates the column is variable length. ulColumnSize in the DBCOLUMNDESC structure contains the maximum size of the column. For information about the DBCOLUMNDESC structure, see ITableDefinition::CreateTable in the OLE DB Programmer's Reference.
DBPROP_COL_NULLABLE Type: VT_BOOL

Typical R/W: R/W

Description: Nullable

Specifies whether a column can contain a NULL value, that is:

  • VARIANT_TRUE, which indicates the column can contain NULL values.

  • VARIANT_FALSE, which indicates the column cannot contain NULL values.
DBPROP_COL_PRIMARYKEY Type: VT_BOOL

Typical R/W: Not supported

Description: Primary Key

Specifies whether the column is part of the primary key of the table, that is:

  • VARIANT_TRUE, which indicates the column is part of the primary key.

  • VARIANT_FALSE, which indicates the column is not part of the primary key.
DBPROP_COL_UNIQUE Type: VT_BOOL

Typical R/W: Not supported

Description: Unique

Specifies whether the values of the column must be unique in the table, that is:

  • VARIANT_TRUE, which indicates the values of the column must be unique within the table.

  • VARIANT_FALSE, which indicates the values of the column can be repeated within the table.