A data conversion error occurs when a value is out of the valid range. For example, if a DB2 source column with a DATE datatype has a value of Jan 1, 1899, and the DB2 access service datatype conversion property DateResults is set to datetime4, a value error occurs because the DB2 DATE value cannot be expressed in an Open Client and Open Server CS_DATETIME4 datatype.
When the appropriate DateTimeConvertError or NumConvertError property value is reject and DB2 returns results with data values that are out of range for the associated DB2 access service data conversion property value, the DB2 access service inserts a header row into the result set immediately after the rejected row. This results in an additional header row for every rejected row in the result set.
Configuration properties control the behavior of an access service when it encounters data conversion errors.
For example, when converting DB2 DATE or TIME values to Open Client and Open Server CS_DATETIME values, an access service can insert default information, which is configured by data conversion error properties, for the unknown date or time.
For a description of data conversion error properties and associated values, refer to “Data Conversion Error properties”.
The following table indicates conditions that cause value errors.
DB2 datatype & Open Client and Open Server conversion |
DB2 value |
---|---|
FLOAT, REAL, or DECIMAL and FloatResults value is real |
Greater than 3.402823466E38 or less than -3.402823466E38 |
DECIMAL, FLOAT, or REAL and DecimalResults value is money |
Greater than 922337203685477.5807 or less than -922337203685477.5808 |
DECIMAL, FLOAT, REAL or INT and DecimalResults value is money4 |
Greater than 214748.3646 or less than -214748.3647 |
DATE DateResults value is datetime |
DATE value is less than January 1, 1753 |
DATE DateResults value is datetime4 |
DATE value is less than January 1, 1900, or greater than June 6, 2079 |
TIMESTAMP and DateTimeResults value is datetime |
TIMESTAMP year is less than 1753 |
TIMESTAMP and DateTimeResults value is datetime4 |
TIMESTAMP date is less than January 1, 1900, or greater than June 6, 2079 |
Copyright © 2005. Sybase Inc. All rights reserved. |