Microsoft SDK for Java

AdoEnums.DataType Class Fields

The DataType class contains the fields shown in the following table.

Constant Value Description
EMPTY 0 Specifies no value was specified (DBTYPE_EMPTY).
SMALLINT 2 Indicates a 2-byte signed integer (DBTYPE_I2).
INTEGER 3 Indicates a 4-byte signed integer (DBTYPE_I4).
SINGLE 4 Indicates a single-precision floating-point value (DBTYPE_R4).
DOUBLE 5 Indicates a double-precision floating-point value (DBTYPE_R8).
CURRENCY 6 Indicates a currency value (DBTYPE_CY). Currency is a fixed-point number with four digits to the right of the decimal point. It is stored in an 8-byte signed integer scaled by 10,000.
DATE 7 Indicates a date value (DBTYPE_DATE). A date is 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.
BSTR 8 Indicates a null-terminated character string (Unicode) (DBTYPE_BSTR).
IDISPATCH 9 Indicates a pointer to an IDispatch interface on an OLE object (DBTYPE_IDISPATCH).

Note   This data type is currently not supported by ADO (Microsoft® ActiveX Data Objects). Usage may cause unpredictable results.

ERROR 10 Indicates a 32-bit error code (DBTYPE_ERROR).
BOOLEAN 11 Indicates a boolean value (DBTYPE_BOOL).
VARIANT 12 Indicates an Automation Variant (DBTYPE_VARIANT).

Note   This data type is currently not supported by ADO. Usage may cause unpredictable results.

IUNKNOWN 13 Indicates a pointer to an IUnknown interface on an OLE object (DBTYPE_IUNKNOWN).

Note   This data type is currently not supported by ADO. Usage may cause unpredictable results.

DECIMAL 14 Indicates an exact numeric value with a fixed precision and scale (DBTYPE_DECIMAL).
TINYINT 16 Indicates a 1-byte signed integer (DBTYPE_I1).
UNSIGNEDTINYINT 17 Indicates a 1-byte unsigned integer (DBTYPE_UI1).
UNSIGNEDSMALLINT 18 Indicates a 2-byte unsigned integer (DBTYPE_UI2).
UNSIGNEDINT 19 Indicates a 4-byte unsigned integer (DBTYPE_UI4).
BIGINT 20 Indicates an 8-byte signed integer (DBTYPE_I8).
UNSIGNEDBIGINT 21 Indicates an 8-byte unsigned integer (DBTYPE_UI8).
FILETIME 64 Indicates a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (DBTYPE_FILETIME).
GUID 72 Indicates a globally unique identifier (GUID) (DBTYPE_GUID).
BINARY 128 Indicates a binary value (DBTYPE_BYTES).
CHAR 129 Indicates a String value (DBTYPE_STR).
WCHAR 130 Indicates a null-terminated Unicode character string (DBTYPE_WSTR).
NUMERIC 131 Indicates an exact numeric value with a fixed precision and scale (DBTYPE_NUMERIC).
USERDEFINED 132 Indicates a user-defined variable (DBTYPE_UDT).
DBDATE 133 Indicates a date value (yyyymmdd) (DBTYPE_DBDATE).
DBTIME 134 Indicates a time value (hhmmss) (DBTYPE_DBTIME).
DBTIMESTAMP 135 Indicates a date-time stamp (yyyymmddhhmmss plus a fraction in billionths) (DBTYPE_DBTIMESTAMP).
CHAPTER 136 Indicates a four-byte chapter value used to identify rows in a child rowset (DBTYPE_HCHAPTER).
PROPVARIANT 138 Indicates an Automation PROPVARIANT (DBTYPE_PROP_VARIANT).
VARNUMERIC 139 Indicates a numeric value (Parameter object only).
VARCHAR 200 Indicates a String value (Parameter object only).
LONGVARCHAR 201 Indicates a long String value (Parameter object only).
VARWCHAR 202 Indicates a null-terminated Unicode character string (Parameter object only).
LONGVARWCHAR 203 Indicates a long null-terminated string value (Parameter object only).
VARBINARY 204 Indicates a binary value (Parameter object only).
LONGVARBINARY 205 Indicates a long binary value (Parameter object only).

© 1999 Microsoft Corporation. All rights reserved. Terms of use.