![]() | ![]() |
Home |
|
|
Access Service User's Guide DirectConnect for AS/400 |
|
| Chapter 10 Using Bulk Copy Transfer |
|
| Errors from data values |
The following four tables show the values that cause errors for the access service during bulk copy transfer. These tables are divided into the four major groups of input datatypes:
Character datatypes
Numeric datatypes
Date datatypes
Binary datatypes
Each table shows the output datatype and the kind of error that can occur.
This table uses the following as the source character datatypes:
Open Server datatypes:
CS_CHAR
CS_VARCHAR
CS_TEXT
AS/400 datatypes:
CHAR
VARCHAR
The following table shows the errors that can occur when the access service converts the preceding character datatypes to those listed in the Open Server and AS/400 Output Datatype column.
In the Output Datatype column of the following four tables, the CS_ prefix is attached to the Open Server datatypes to distinguish them from AS/400 datatypes.
Open Server and AS/400 Output Datatype | Error Condition |
CS_CHAR CS_VARCHAR CS_TEXT CS_BINARY CS_VARBINARY CHAR VARCHAR | The source data is longer than the destination column. |
CS_BIT | The source value cannot be converted to a number, or the resulting value does not equal 0 or 1. |
CS_TINYINT | The source value cannot be converted to a number, or the resulting value is not between 0 and 255. |
CS_SMALLINT SMALLINT | The source value cannot be converted to a number, or the resulting value is not between -32,768 and +32,767. |
CS_INTEGER INTEGER | The source value cannot be converted to a number, or the resulting value is not between -2,147,483,648 and +2,147,483,647. |
CS_DECIMAL DECIMAL | The source value cannot be converted to a number, or the number of digits to the left of the decimal point in the source exceeds the destination decimal's precision minus scale. Digits to the right of the decimal point that exceed the decimal's scale are truncated without error. |
REAL FLOAT | The source value cannot be converted to a number, or the resulting value is one of the following:
|
CS_REAL CS_FLOAT | The source value cannot be converted to a number, or it is out of range. Because the value range is machine-dependent, see the Adaptive Server documentation for your environment. |
CS_MONEY | The source value cannot be converted to a number, or the resulting value is not between -922,337,203,685,477.5807 and +922,337,203,685,477.5807. |
CS_MONEY4 | The source value cannot be converted to a number, or the resulting value is not between -214,748.3647 and +214,748.3647. |
CS_DATE | The source value is not an ISO format (YYYY-MM-DD) date or a valid Adaptive Server date/time string, or the resulting date has a year prior to 1753. |
CS_DATETIME4 | The source value is not an ISO format (YYYY-MM-DD) date or a valid Adaptive Server date/time string, or the resulting date is not between January 1, 1900, and June 6, 2079. |
DATE TIME TIMESTAMP | The source value is not an ISO format date, time or timestamp, or a valid Adaptive Server date/time string. |
This section uses the following as source numeric datatypes:
Open Server datatypes:
CS_BIT
CS_TINYINT
CS_SMALLINT
CS_INT
CS_REAL
CS_FLOAT
CS_DECIMAL
CS_MONEY
CS_MONEY4
AS/400 datatypes:
SMALLINT
INTEGER
FLOAT
REAL
DECIMAL
The following table shows the errors that can occur when the access service converts the preceding source numeric datatypes to those listed in the Open Server and AS/400 Output Datatype column.
Open Server and AS/400 Output Datatype | Error Condition |
CS_CHAR CS_VARCHAR CHAR VARCHAR | The destination column is too small to hold the character string to express the value. For example, the source value is 102, and the destination column is CS_CHAR(2). |
CS_BIT | The value does not equal 0 or 1. |
CS_TINYINT | The value is not between 0 and 255. |
CS_SMALLINT SMALLINT | The value is not between -32,768 and +32,767. |
CS_INTEGER INTEGER | The value is not between -2,147,483,648 and +2,147,483,647. |
CS_DECIMAL DECIMAL | The number of digits to the left of the decimal point in the source exceeds the precision minus scale of the destination decimal. Digits to the right of the decimal point that exceed the decimal's scale are truncated without error. |
REAL FLOAT | The source value is one of the following:
|
CS_REAL CS_FLOAT | The source value is out of range. Because the value range is machine-dependent, see the Adaptive Server documentation for your environment. |
CS_MONEY | The value is not between -922,337,203,685,477.5807 and +922,337,203,685,477.5807. Because the accuracy of a FLOAT value is 15 digits, a FLOAT value converted to CS_MONEY is accurate only to the nearest dollar. Because the highest precision of a REAL value is 7 digits, a REAL value converted to CS_MONEY is accurate only to the nearest hundred million dollars. |
CS_MONEY4 | The value is not between -214,748.3647 and +214,748.3647. |
This section uses the following as source date datatypes:
Open Server datatype:
CS_DATETIME
CS_DATETIME4
AS/400 datatypes:
DATE
TIME
TIMESTAMP
The following table shows the errors that can occur when the access service converts the preceding source date datatypes to those listed in the Open Server and AS/400 Output Datatype column.
Open Server and AS/400 Output Datatype | Error Condition |
CS_CHAR CS_VARCHAR CS_TEXT CHAR VARCHAR | When converted into a character string, the date or time value is too long to fit into the destination column. |
CS_DATE | The date has a year prior to 1753. |
CS_DATETIME4 | The date is not between January 1, 1900, and June 6, 2079. |
This section uses the following as source binary datatypes:
Open Server datatype:
CS_BINARY
CS_VARBINARY
CS_IMAGE
AS/400 datatypes:
CHAR FOR BIT DATA
VARCHAR FOR BIT DATA
The following table shows the errors that can occur when the access service converts the preceding source binary datatypes to those listed in the Open Server and AS/400 Output Datatype column.
Open Server and AS/400 Output Datatype | Error Condition |
CS_CHAR CS_VARCHAR CS_TEXT CS_BINARY CS_VARBINARY CS_IMAGE CHAR VARCHAR | The source data is longer than the destination column. |
|
|