Type Property

The Type property on a Field object indicates the operational type or data type for Field or Property objects. This property sets or returns a DataTypeEnum value.

numericPrecision = currentfield.Property
 

Remarks

The Type property is used to return the data type of a numeric field object.

The value returned by the Type property on a Field object can be one of the following enumerated values for DataTypeEnum:

Enumeration Value Description
adEmpty 0 This data type indicates that no value was specified (DBTYPE_EMPTY).
adSmallInt 2 This data type indicates a 2-byte (16-bit) signed integer (DBTYPE_I2).
adInteger 3 This data type indicates a 4-byte (32-bit) signed integer (DBTYPE_I4).
adSingle 4 This data type indicates a 4-byte (32-bit) single-precision IEEE floating-point number (DBTYPE_R4).
adDouble 5 This data type indicates an 8-byte (64-bit) double-precision IEEE floating-point number (DBTYPE_R8).
adCurrency 6 A data type indicates a currency value (DBTYPE_CY). Currency is a fixed-point number with 4 digits to the right of the decimal point. It is stored in an 8-byte signed integer scaled by 10,000. This data type is not supported by the OLE DB Provider.
adDate 7 This data type indicates a date value stored as a Double, the whole part of which is the number of days since December 30, 1899, and the fractional part of which is the fraction of a day. This data type is not supported by the OLE DB Provider.
adBSTR 8 This data type indicates a null-terminated Unicode character string (DBTYPE_BSTR). This data type is not supported by the OLE DB Provider.
adIDispatch 9 This data type indicates a pointer to an IDispatch interface on an OLE object (DBTYPE_IDISPATCH). This data type is not supported by the OLE DB Provider.
adError 10 This data type indicates a 32-bit error code (DBTYPE_ERROR). This data type is not supported by the OLE DB Provider.
adBoolean 11 This data type indicates a Boolean value (DBTYPE_BOOL). This data type is not supported by the OLE DB Provider.
adVariant 12 This data type indicates an Automation variant (DBTYPE_VARIANT). This data type is not supported by the OLE DB Provider.
adIUnknown 13 This data type indicates a pointer to an IUnknown interface on an OLE object (DBTYPE_IUNKNOWN). This data type is not supported by the OLE DB Provider.
adDecimal 14 This data type indicates numeric data with a fixed precision and scale (DBTYPE_DECIMAL).
adTinyInt 16 This data type indicates a single -byte (8-bit) signed integer (DBTYPE_I1). This data type is not supported by the OLE DB Provider.
adUnsignedTinyInt 17 This data type indicates a single-byte (8-bit) unsigned integer (DBTYPE_UI1). This data type is not supported by the OLE DB Provider.
adUnsignedSmallInt 18 This data type indicates a 2-byte (16-bit) unsigned integer (DBTYPE_UI2). This data type is not supported by the OLE DB Provider.
adUnsignedInt 19 This data type indicates a 4-byte (32-bit) unsigned integer (DBTYPE_UI4). This data type is not supported by the OLE DB Provider.
adBigInt 20 This data type indicates an 8-byte (64-bit) signed integer (DBTYPE_I8). This data type is not supported by the OLE DB Provider.
adUnsignedBigInt 21 This data type indicates an 8-byte (64-bit) unsigned integer (DBTYPE_UI8). This data type is not supported by the OLE DB Provider.
adGUID 72 This data type indicates a globally unique identifier or GUID (DBTYPE_GUID). This data type is not supported by the OLE DB Provider.
adBinary 128 This data type indicates fixed-length binary data (DBTYPE_BYTES).
adChar 129 This data type indicates a character string value (DBTYPE_STR).
adWChar 130 This data type indicates a null-terminated Unicode character string (DBTYPE_WSTR). This data type is not supported by the OLE DB Provider.
adNumeric 131 This data type indicates numeric data where the precision and scale are exactly as specified (DBTYPE_NUMERIC). .
adUserDefined 132 This data type indicates user-defined data (DBTYPE_UDT). This data type is not supported by the OLE DB Provider.
adDBDate 133 This data type indicates a OLE DB date structure (DBTYPE_DATE).
adDBTime 134 This data type indicates a OLE DB time structure (DBTYPE_TIME).
adDBTimeStamp 135 This data type indicates a OLE DB timestamp structure (DBTYPE_TIMESTAMP).
adVarChar 200 This data type indicates variable-length character data (DBTYPE_STR).
adLongVarChar 201 This data type indicates a long string value.
adVarWChar 202 This data type indicates a Unicode string value. This data type is not supported by the OLE DB Provider.
adLongVarWChar 203 This data type indicates a long Unicode string value. This data type is not supported by the OLE DB Provider.
adVarBinary 204 This data type indicates variable-length binary data (DBTYPE_BYTES).
adLongVarBinary 205 This data type indicates a long binary value.

The corresponding OLE DB type indicator is shown in parentheses in the description column of the above table. For more information on OLE DB data types, see the OLE DB 1.1 Programmer's Reference.