skip to main content
OpenEdge Data Management: DataServer for ODBC
ODBC Data Source Data Types
 

ODBC Data Source Data Types

ODBC data-source data types differ from OpenEdge data types. However, each data-source data type supported by the DataServer has at least one OpenEdge equivalent. This appendix provides details on DB2 UDB, SQL-ODBC and OpenEdge data types.
The DataServer translates ODBC data-source data types into OpenEdge equivalents and places the mapping into the schema holder. You can access this mapping information using the Data Dictionary. Note, however, that the Data Dictionary lists the ODBC SQL equivalents for data-source data types rather than the actual data-source data types. For example, the Data Dictionary lists the Sybase datetime and smalldatetime data types as timestamp, which is the equivalent ODBC SQL data type and not the Sybase timestamp data type. There may also be some restrictions in data-source compatibility with OpenEdge. For example, the OpenEdge database cannot support a numeric or decimal field defined in Sybase with greater than 28 digits.
You can also modify these definitions using the Data Dictionary. For example, the DataServer maps the Sybase tinyint data type to the OpenEdge equivalent, INTEGER. Suppose, however, that your application uses the tinyint field in such a way that the LOGICAL data type is a more suitable equivalent. In this case, you would change the data type from INTEGER to LOGICAL in the schema holder. If you do change a data-type mapping, be sure to select a data type that accommodates the data in the column, otherwise conversion errors might occur at run time. Also, remember to specify a display format that is appropriate for the new data type. See the Changing a code page in a schema holder for an explanation of how to use the Data Dictionary to change OpenEdge data types in the schema holder.
The tables in the following sections list, for each ODBC data source, the data types supported by the DataServer, the ODBC SQL equivalents, and the default OpenEdge equivalents. The notes that follow some tables provide additional information.
In this section: 
* DB2 UDB data type equivalencies
* Sybase data type equivalencies