Developing Portable Applications > Developing Portable Applications > C. Data Type Mapping > Microsoft SQL Server Gateway > Microsoft SQL Server Data Type Mapping to Client Data Type Mapping
Was this helpful?
Microsoft SQL Server Data Type Mapping to Client Data Type Mapping
The following table shows Microsoft SQL Server data type mapping to client data type mapping:
SQL Server Data Types
Client Data Types
BIGINT
BIGINT
BINARY VARYING(n)
Not Supported
BINARY(n)
Not Supported
BIT
CHAR(1)
CHAR(n)
CHAR(n)
Note:  CHARACTER(n) is a synonym for CHAR(n).
CHARACTER VARYING(n)
VARCHAR(n)
DATETIME
DATE
DEC(p,s)
DECIMAL(p,s)
DECIMAL(p,s)*
Note:  DECIMAL(p,s)*
If you select the money mapping for Microsoft SQL Server, all data declared as DECIMAL(19,4), DECIMAL(10,4), MONEY and SMALLMONEY is returned as OpenSQL Money data type.
DOUBLE PRECISION
FLOAT
FLOAT(n)
FLOAT
IMAGE
LONG BYTE
The IMAGE type will be deprecated in a future version of Microsoft SQL Server. Enterprise Access now maps to the recommended Microsoft SQL Server VARBINARY(MAX).
INT
INTEGER
INTEGER
INTEGER
MONEY
FLOAT—Default money data type mapping
MONEY—Money data type mapping
If you select the money mapping for Microsoft SQL Server, all data declared as DECIMAL(19,4), DECIMAL(10,4), MONEY and SMALLMONEY is returned as OpenSQL Money data type.
NCHAR(n)
NCHAR(n)
NTEXT
LONG NVARCHAR
The NTEXT type will be deprecated in a future version of Microsoft SQL Server. Enterprise Access now maps to the recommended NVARCHAR(MAX).
NVARCHAR(MAX)
LONG NVARCHAR
NVARCHAR(n)
NVARCHAR(n)
NUMERIC(p,s)
DECIMAL(p,s)
REAL
FLOAT4
SMALLDATETIME
DATE
SMALLINT
SMALLINT
SMALLMONEY
FLOAT—Default money data type mapping
MONEY—Money data type mapping
If you select the money mapping for Microsoft SQL Server, all data declared as DECIMAL(19,4), DECIMAL(10,4), MONEY and SMALLMONEY is returned as OpenSQL Money data type.
TEXT
LONG VARCHAR
The TEXT type will be deprecated in a future version of Microsoft SQL Server. Enterprise Access now maps to the recommended VARCHAR(MAX).
TIMESTAMP
DATE
TINYINT
INTEGER1—Range from 0 to +127. This range is a subset of the MS SQL data type TINYINT range (0 to +255) and the OpenSQL data type INT1 range (-128 to +127). Microsoft SQL does not issue an error if the parameter is greater than 127 and less than 256. Values greater than 127 are returned as negative numbers (in twos complement).
VARBINARY(MAX)
LONG BYTE
VARBINARY(n)
Not supported
VARCHAR(MAX)
LONG VARCHAR
VARCHAR(n)
VARCHAR(n)
* If the Ingres client is an Ingres 6.4 installation, the gateway will fail any query that has a result list that contains this data type. This protects the Ingres 6.4 interfaces from being exposed to data types that they cannot support. The maximum allowed decimal precision for Microsoft SQL Server is 39 (0–38) with Ingres 9.2 or higher.
Last modified date: 08/22/2022