SQL Server Data Type Constants (SQLDMO_QUERY_DATATYPE)

SQL Server data type constants are returned by the ColumnType property of the QueryResults object. The constants report the Microsoft® SQL Server™ data type of the column data and direct data extraction from the result set.

Constant Value Description
SQLDMO_DTypeBinary -2 Fixed length binary data.
SQLDMO_DTypeBit -7 Unsigned integer data. The width of the integer is one byte.
SQLDMO_DTypeChar 1 Fixed length character.
SQLDMO_DTypeDateTime -2 ODBC SQL_TIMESTAMP_STRUCT.
SQLDMO_DTypeDateTime4 93 ODBC SQL_TIMESTAMP_STRUCT.
SQLDMO_DTypeFloat4 7 Approximate numeric data. The width of the numeric value is four bytes.
SQLDMO_DTypeFloat8 8 Approximate numeric data. The width of the numeric value is eight bytes.
SQLDMO_DTypeGUID -11 Globally unique identifier (GUID). The data is a data structure 16 bytes in length.
SQLDMO_DTypeImage -4 Long, variable length binary data.
SQLDMO_DTypeInt1 -6 Unsigned integer data. The width of the integer is one byte.
SQLDMO_DTypeInt2 5 Signed integer data. The width of the integer is two bytes.
SQLDMO_DTypeInt4 4 Signed integer data. The width of the integer is four bytes.
SQLDMO_DTypeMoney4 3 Scaled integer data represented as a string value.
SQLDMO_DTypeMoney 3 Scaled integer data represented as a string value.
SQLDMO_DTypeNText -10 Long, variable length, Unicode character data.
SQLDMO_DTypeText -1 Long, variable length character data.
SQLDMO_DTypeUChar -8 Fixed length, Unicode character data.
SQLDMO_DTypeUnknown 0 Bad or not supported data type value.
SQLDMO_DTypeUVarchar -9 Variable length, Unicode character data.
SQLDMO_DTypeVarBinary -3 Variable length binary data.
SQLDMO_DTypeVarchar 12 Variable length character data.

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.