MySQL Data Types and MDSMySQL Driver - cDbUpdateFunctionLibrary


The table show how SQL data types maps to DataFlex native types and the capacity of each type.  The capacity shown is the highest possible value for the DataFlex side - or if the SQL side max value is lower - the SQL side capacity that is shown. Mostly it is the DataFlex side that has the lower capacity value.


SQL Type Name

SQL Type Constant

DataFlex Type

DataFlex Type

Constant

Capacity






bigint

eMySQL_LONGLONG

Numeric

DF_BCD

14.0

bit

eMySQL_BIT

ASCII

DF_ASCII

4.0

blob

eMySQL_BLOB

Binary

DF_BINARY

16384

char

eMySQL_STRING

ASCII

DF_ASCII

254

date

eMySQL_DATE

Date

DF_DATE

6.0

datetime

eMySQL_DATETIME

DateTime

DF_DATETIME

23.0

decimal

eMySQL_DECIMAL

Numeric

DF_BCD

14.8

double

eMySQL_DOUBLE

Numeric

DF_BCD

14.8

enum

eMySQL_ENUM

ASCII

DF_ASCII

254

float

eMySQL_FLOAT

Numeric

DF_BCD

14.8

int

eMySQL_INT24

Numeric

DF_BCD

11.0

longblob

eMySQL_LONG_BLOB

Binary

DF_BINARY

16384

longtext

eMySQL_LONG_TEXT

Text

DF_TEXT

16384

mediumblob

eMySQL_MEDIUM_BLOB

Binary

DF_BINARY

16384

mediumint

eMySQL_INT24

Numeric

DF_BCD

9.0

mediumtext

eMySQL_MEDIUM_TEXT

Text

DF_TEXT

16384

set

eMySQL_SET

ASCII

DF_ASCII

254

smallint

eMySQL_SHORT

Number

DF_BCD

6.0

text

eMySQL_TEXT

Text

DF_TEXT

16384

time

eMySQL_TIME

ASCII

DF_ASCII

10.0

timestamp

eMySQL_TIMESTAMP

DateTime

DF_DATETIME

23.0

tinyblob

eMySQL_TINY_BLOB

Binary

DF_BINARY

254

tinyint

eMySQL_TINY

Numeric

DF_BCD

4.0

tinytext

eMySQL_TINY_TEXT

ASCII

DF_ASCII

254

varchar

eMySQL_VAR_STRING

Text

DF_TEXT

16384

year

eMySQL_YEAR

Number

DF_BCD

4.0