When reading data from a PRO/5 data source, the BASIS ODBC Driver maps data with the following characteristics (as defined in the Data Dictionary) to the following SQL Data Types:
Type
SQL Type
NAME
C(n*) (n <=255)
SQL_VARCHAR
"VARCHAR"
C(n*) (n > 255)
SQL_LONGVARCHAR *
"LONG VARCHAR"
C(n)
SQL_CHAR
"CHAR"
C(26) (Typedef = TIMESTAMP)
SQL_TIMESTAMP
"TIMESTAMP" *
d (date suffix)
SQL_DATE
"DATE"
N
SQL_NUMERIC **
"NUMERIC"
B
SQL_REAL
"REAL"
D
SQL_REAL
"REAL"
I(4)
SQL_INTEGER
"INTEGER"
I(2)
SQL_SMALLINT
"SMALLINT"
I(1)
SQL_TINYINT
"BYTE"
I(not 4,2, or 1)
SQL_CHAR
"CHAR"
U(4)
SQL_INTEGER
"UNSIGNED INTEGER"
U(2)
SQL_SMALLINT
"UNSIGNED SMALLINT"
U(1)
SQL_TINYINT
"UNSIGNED BYTE"
U(not 4,2, or 1)
SQL_CHAR
"CHAR"
X
SQL_FLOAT
"FLOAT"
F
SQL_FLOAT
"FLOAT"
Y
SQL_DOUBLE
"DOUBLE"
* When the BASIS ODBC Driver encounters a variable length character field defined by a length of more than 255 bytes, it will inform the calling application that the column is of type SQL_LONGVARCHAR. Many applications treat SQL_LONGVARCHAR as a 'Memo' field.
**The SQL_NUMERIC types have a precision of 15 instead of 16. Microsoft Access now treats numerics as numerics, not as strings. When doing a CREATE TABLE, the following SQL data types map to the corresponding PRO/5 data types:
SQL Data Types
PRO/5 Data Types
CHARACTER
C
CHAR
C
CHARACTER VARYING
C ** (Variable length character field padded with null characters).
CHAR VARYING
C ** (Variable length character field padded with null characters).
VARCHAR
C ** (Variable length character field padded with null characters).
FLOAT
F
DOUBLE
Y
REAL
B
BYTE
I(1)
SMALLINT
I(2)
INTEGER
I(4)
UNSIGNED BYTE
U(1)
UNSIGNED SMALLINT
U(2)
UNSIGNED INTEGER
U(4)
TIMESTAMP
C(26) (Typedef = "TIMESTAMP")
DATE
If Date Type set in data source setup, then C(OEM date size) else I(4) for Julian. OEM Dates that cannot be recognized will be treated as NULLs.