Try OpenEdge Now
skip to main content
DataServer for Oracle
Initial Programming Considerations : Data types
 

Data types

Oracle data types differ from OpenEdge data types. However, each Oracle internal data type supported by the DataServer has at least one OpenEdge equivalent.
The DataServer translates the Oracle data types into OpenEdge equivalents. When an Oracle data type has more than one OpenEdge equivalent, the DataServer supplies a default data type. The schema image contains the OpenEdge data definitions for the Oracle columns, which you can modify by using the Data Dictionary. For example, the DataServer assigns the NUMBER data type the OpenEdge equivalent, DECIMAL. You can then change the data type from DECIMAL to either INTEGER, INT64,or LOGICAL.
Note: In 10.1B, the OpenEdge INTEGER and INT64 data types, respectively, can each be recognized by the Oracle NUMBER data type.
See Modifyinga schema image for an explanation of how to change OpenEdge data types in the schema image.
Note: You cannot change the data type of a stored procedure parameter. Although you can use the Data Dictionary to view the stored procedure properties in the schema holder, you cannot modify them.
Oracle allows users to define their own data types, known as external data types. Oracle converts these external types to an equivalent internal type. For example, a FLOAT data type maps to NUMBER. The DataServer also considers it to be a NUMBER and maps it to DECIMAL in the schema image by default. However, beginning in OpenEdge Release 10.1B, you can choose to update the NUMBER definition to an alternative INT64 data type. For more information, see the following table.
The following table lists the Oracle internal data types supported by the DataServer and their OpenEdge equivalents. The table also shows the default equivalent supplied by the DataServer for those Oracle data types with more than one OpenEdge equivalent. The sections directly following the table provide additional details about several of the Oracle data types and each data type's OpenEdge equivalent.
Table 8. Oracle and OpenEdge data types
Oracle data type
OpenEdge equivalent data type
CHAR
CHARACTER
CFILE
CLOB
CLOB
CLOB
VARCHAR2
CHARACTER
NCHAR1
NVARCHAR22
CHARACTER
NCLOB3
CLOB
NUMBER
DECIMAL
INTEGER
INT64 4
LOGICAL
NUMBER (10)5
INT64
NUMBER (11)6
INT64
NUMBER (7,2)7 NUMBER(13,2)8 NUMBER (20*)9
DECIMAL
CURSOR
INTEGER
DATE
DATE
INTEGER
LONG
CHARACTER
RAW (limited support)
RAW
LONG RAW
RAW
BLOB
BLOB
BFILE
BLOB
FLOAT
DECIMAL
DATETIME (CHAR)10
CHARACTER
TIME
INTEGER
LONG CHARACTER
CHARACTER
UNDEFINED
CHARACTER
ROWID
CHARACTER
LOGICAL
LOGICAL

1 Schema image code page must be UTF-8 to support these data types.

2 Schema image code page must be UTF-8 to support these data types.

3 Schema image code page must be UTF-8 to support these data types.

4 Starting with OpenEdge Release 10.1B, Oracle Data Servers users have the option to employ the INT64 data type, as needed, to better accommodate foreign column definitions. However, it is strongly recommended that you plan carefully and only make INT64 data type-related changes to those table columns and program variables that you expect will require large number values.

5 The number within parenthenses indicates the number of digits.

6 The number within parenthenses indicates the number of digits.

7 The numbers within parentheses indicate the NUMBER data type has a precision of 7 and a scale of 2

8 The numbers within the parentheses indicate that the NUMBER data type has a precision of 13 and a scale of 2.

9 The information in parentheses indicates 20 or more digits.

10 For more information, see Workingwith Datetime data types.

Note: The only Oracle internal data type that the DataServer does not support is ROWID. The Oracle ROWID, however, has its programming equivalent in the OpenEdge ROWID. See the for more information.
* Oracle NUMBER data type
* Oracle CHAR and VARCHAR2 data types
* Oracle Number data
* Logical data type and Oracle equivalents
* ABL supports RAW data type
* Oracle BLOB and BFILE data types
* Oracle CLOB and CFILE data types
* Oracle DATE data type
* Working with Datetime data types
* Unsupported data types