skip to main content
Welcome to the Progress DataDirect for ODBC for SQL Server Wire Protocol: Version 8.0.2 : Data Types
  

Try DataDirect Drivers Now

Data Types

The following table shows how the Microsoft SQL Server and Windows Azure SQL Database data types are mapped to the standard ODBC data types. "Unicode Support" lists Microsoft SQL Server to Unicode data type mappings.
Table 1. Microsoft SQL Server Data Types
SQL Server
ODBC
binary
SQL_BINARY
bigint
SQL_BIGINT
bigint identity
SQL_BIGINT
bit
SQL_BIT
char
SQL_CHAR
date1
SQL_TYPE_DATE
datetime
SQL_TYPE_TIMESTAMP
datetime22
SQL_TYPE_TIMESTAMP
decimal
SQL_DECIMAL
decimal() identity
SQL_DECIMAL
float
SQL_FLOAT
image
SQL_LONGVARBINARY
int
SQL_INTEGER
int identity
SQL_INTEGER
money
SQL_DECIMAL
numeric
SQL_NUMERIC
numeric() identity
SQL_NUMERIC
real
SQL_REAL
smalldatetime
SQL_TYPE_TIMESTAMP
smallint
SQL_SMALLINT
smallint identity
SQL_SMALLINT
smallmoney
SQL_DECIMAL
text
SQL_LONGVARCHAR
time3, 4
SQL_TYPE_TIMESTAMP
timestamp
SQL_BINARY
tinyint
SQL_TINYINT
tinyint identity
SQL_TINYINT
uniqueidentifier
SQL_GUID
varbinary
SQL_VARBINARY
varbinary(max)5
SQL_LONGVARBINARY
varchar
SQL_VARCHAR
varchar(max)6
SQL_LONGVARCHAR

1 Supported only on Microsoft SQL Server 2008 and higher.

2 Supported only on Microsoft SQL Server 2008 and higher.

3 Supported only on Microsoft SQL Server 2008 and higher.

4 Time mapping changes based on the setting of the Fetch TWFS as Time option.

5 Supported only on Microsoft SQL Server 2005 and higher.

6 Supported only on Microsoft SQL Server 2005 and higher.

* Unicode Support
* Retrieving Data Type Information