company logo

Data conversion

ODABA provides built-in data conversion support. Most types of conversion between elementary data types are supported, but some conversions may result in empty values.

Converting values behave differently depending on the value type for source (right) and target (left) operand.Thus, elementary values might be converted into elementary values, but also into complex values or arrays. Reversely, arrays or complex values may be converted into elementary values.

Conversion is considered as a feature between attribute and complex values, but not for collection values. Built-in conversion functions will ignore collection properties, when being part of a value.

Most of elementary data type can be converted into each other. The following list shows the unsupported conversions. Unsupported conversions will signal an error or may throw an exception.

From

To

int

MEMO, DateTime

bool

MEMO, DateTime, Time, Date

Date

MEMO, Time, double

double

MEMO, DateTime, Time, Date

string

-

Time

MEMO, Date, double

DateTime

MEMO, int, double

Special handling is required for BLOB values, which can be converted into BLOB values, only.

Related topics