Try OpenEdge Now
skip to main content
Programming Interfaces
COM Object Data Type Mapping : Conversions from ABL to COM data types
 

Conversions from ABL to COM data types

The following table lists the possible conversions from ABL data types to COM data types when setting COM object properties, passing method input parameters, or returning event output parameters.
If there is no type information from the COM object and there is no explicit data type specifier in the ABL code (for example, AS SHORT) ABL performs a default conversion as shown in the following table. However, in addition to the listed conversion pairs, ABL can convert other ABL data types to COM data types when the target COM data type is known and the data is compatible. Typically, for example, an ABL INTEGER would be used for a COM parameter defined as Short. In this and other similar conversions, overflow may occur resulting in a run time error condition.
Table 74. Conversions from ABL to COM data types
ABL data type
COM data type
CHARACTER
String
COM-HANDLE
Object
DATE
Date
DATETIME
Date
DATETIME-TZ
Date
DECIMAL
Double
INTEGER
Signed Integer (4 bytes)
INT64
Signed 8-byte Integer
LOGICAL
Boolean
LONGCHAR
String
RAW
Array of bytes
anytype
Variant
Non-obvious data type conversions may be possible, but are not recommended. For example, a character string with the value "123" can be converted to a Currency COM data type, even though the above table does not show a default CHARACTER to Currency conversion pair.
The names for COM data types in the above table conform to a nomenclature used in the documentation for most COM objects. For matching alternatives to these names, seen in some documentation and COM object viewers, see Table 75.
* ABL to COM data type features and limitations