Contents Index Server class mssodbc Server class odbc

ASA SQL User's Guide
  Server Classes for Remote Data Access
    ODBC-based server classes
      Server class mssodbc

Data type conversions: Microsoft SQL Server

When you issue a CREATE TABLE statement, Adaptive Server Anywhere automatically converts the data types to the corresponding Microsoft SQL Server data types. The following table describes the Adaptive Server Anywhere to Microsoft SQL Server data type conversions.

Adaptive Server Anywhere data type Microsoft SQL Server default data type
bit bit
tinyint tinyint
smallint smallint
int int
bigint numeric(20,0)
decimal [defaults p=30, s=6] decimal(prec, scale)
numeric [defaults p=30 s=6] numeric(prec, scale)
float if (prec) float(prec) else float
real real
smallmoney smallmoney
money money
date datetime
time datetime
timestamp datetime
smalldatetime datetime
datetime datetime
char(n) if (length > 255) text else varchar(length)
character(n) char(n)
varchar(n) if (length > 255) text else varchar(length)
long varchar text
binary(n) if (length > 255) image else binary(length)
long binary image
double float
uniqueidentifierstr uniqueidentifier

The SQL Server uniqueidentifier columns is mapped to an Adaptive Server Anywhere uniqueidentifierstr column. The resulting string can be converted to a binary UUID value using the STRTOUUID function. See STRTOUUID function [STRING].


Contents Index Server class mssodbc Server class odbc