Specifying Data Types Using Embedded Applications

From InterBase
Jump to: navigation, search

DSQL applications such as isql can correct for the scale factor for SMALLINT and INTEGER data types by examining the XSQLVAR sqlscale field and dividing to produce the correct value.

Important: Embedded applications cannot use or recognize small precision NUMERIC or DECIMAL data types with fractional portions when they are stored as ­SMALLINT or INTEGER types. To avoid this problem, create all NUMERIC and DECIMAL data types that are to be accessed from embedded applications with a precision of 10 or more, which forces them to be stored as 64-bit integer types. Remember to specify a scale if you want to control the precision and scale.

Both SQL and DSQL applications handle NUMERIC and DECIMAL types stored as 64-bit integer without problem.