Specifies the Open Client and Open Server datatype to which a DB2 access service converts DB2 DECIMAL results.
DecimalResults=[autoconvert | int | float | real | char | money | money4 | bcd]
autoconvert
autoconvert means the DB2 access service chooses the appropriate datatype to return according to the following conversion scheme:
The DB2 access service returns CS_DECIMAL datatype to Client-Library applications.
The DB2 access service returns the following values for Client-Library and DB-Library client applications prior to version 10.x:
If the decimal value has 0 digits to the right of the decimal delimiter and the total number of digits is less than or equal to 9 (scale equals 0 and precision is equal to or less than 9), the DB2 access service returns CS_INT.
If the decimal value has 0 to 2 digits to the right of the decimal delimiter and the total number of digits is less than or equal to 14 (scale is equal to or less than 2 and precision minus scale is equal to or less than 14), the DB2 access service returns CS_MONEY.
For any other decimal value, the DB2 access service returns CS_FLOAT.
int returns CS_INT, a 4-byte integer type.
float returns CS_FLOAT, an 8-byte float type.
real returns CS_REAL, a 4-byte float type.
char returns CS_CHAR, a character type.
money returns CS_MONEY, an 8-byte money type.
money4 returns CS_MONEY4, a 4-byte money type.
bcd is valid only if you have columns described in BCD format.
The DB2 access service returns BCD columns as CS_BINARY or CS_VARBINARY with the following format:
If precision is even, the first nibble is 0.
Intervening digits are represented in binary coded decimal (BCD) format with one nibble per digit.
The final nibble indicates the sign: C is positive, and D is negative.
No indication of decimal position is given. The client application is responsible for determining decimal position.
If the ClientDecimalSeparator property value is a character other than a period (.), set the DecimalResults property value to char to enable the DB2 access service to return decimal results with the correct client decimal delimiter.
Copyright © 2005. Sybase Inc. All rights reserved. |