Column Object (ADOX)
Represents a column from a table, index, or key.
Remarks
The following code creates a new Column:
Dim obj As New Column
With the properties and collections of a Column object, you can:
Identify the column with the Name Property (ADOX) property.
Specify the data type of the column with the Type Property (Key) (ADOX) property.
Determine if the column is fixed-length, or if it can contain null values with the Attributes Property (ADOX) property.
Specify the maximum size of the column with the DefinedSize Property (ADOX) property.
For numeric data values, specify the scale with the NumericScale Property (ADOX) property.
For numeric data value, specify the maximum precision with the Precision Property (ADOX) property.
Specify the Catalog Object (ADOX) that owns the column with the ParentCatalog Property (ADOX) property.
For key columns, specify the name of the related column in the related table with the RelatedColumn Property (ADOX) property.
For index columns, specify whether the sort order is ascending or descending with the SortOrder Property (ADOX) property.
Access provider-specific properties with the Properties Collection (ADO) collection.
Note
Not all properties of Column objects may be supported by your data provider. An error will occur if you have set a value for a property that the provider does not support. For new Column objects, the error will occur when the object is appended to the collection. For existing objects, the error will occur when setting the property.
When creating Column objects, the existence of an appropriate default value for an optional property does not guarantee that your provider supports the property. For more information about which properties your provider supports, see your provider documentation.
This section contains the following topic.
See Also
Columns and Tables Append Methods, Name Property Example (VB)
Connection Close Method, Table Type Property Example (VB)
Keys Append Method, Key Type, RelatedColumn, RelatedTable and UpdateRule Properties Example (VB)
ADOX Code Example: NumericScale and Precision Properties Example (VB)
ParentCatalog Property Example (VB)
SortOrder Property Example (VB)
Columns Collection (ADOX)
Properties Collection (ADO)