Mapping of SQL Data Types - The Database Update Framework

This section deals with how data types are mapped between DataFlex and various database back-ends and what capacity each type has at the DataFlex side. Use the UtilEnumerateColumnTypes function to receive a struct array of one of these tables based on the iDbType and sDriverID values passed.


They are mainly used by these functions:

UtilEnumerateColumnTypes

UtilColumnTypeToInteger

UtilColumnTypeToString



The tables show how SQL data types maps to DataFlex native types and the capacity of each type.  The capacity shown is the maximum possible value for the DataFlex side - or if the SQL side max value is lower - the SQL side capacity that is shown. Most of the time it is the DataFlex side that has the lowest capacity.


NOTE: Different constant integers are used depending on the database and the driver used. This is because the framework uses the constant integers as defined by DataAccess Worldwide and Mertech Inc. You should never use any of the standard DataFlex data type constants; DF_ASCII, DF_DATE, DF_BCD etc. Instead see the "DataFlex Replacement Data Types".



DataFlex Replacement Data Types

IBM DB2 and DB2_DRV Driver (DAW)

Microsoft SQL Server and MSSQLDRV Driver (DAW)

Microsoft SQL Server and SQLFLEX Driver (Mertech Inc.)

MySQL Database and MDSMySQL Driver (Mertech Inc.)

Oracle Database and ORAFLEX Driver (Mertech Inc.)

PostgreSQL Database and MDSPgSQL Driver (Mertech Inc.)