![]() | ![]() |
Home |
|
|
Access Service User's Guide DirectConnect for AS/400 |
|
| Chapter 9 Understanding the Transfer process |
|
| Transfer errors and error handling |
Transfer processing errors can occur due to:
Structural errors, for which the access service cancels the transfer process before any rows are transferred
Value errors, which occur on a row-by-row basis during the transfer process
Each of these transfer error types is explained in the following sections.
A structural error can be one of two types:
Incompatible datatypes
An incompatible number of columns
Each type is described in the following sections.
Incompatible datatypesDatatypes are incompatible when source and target table datatypes cannot be mapped to one another. For example, binary to datetime transfers are not allowed.
In bulk copy transfers, before the access service moves any data from the source database to the target database, the access service compares datatypes in the source to datatypes in the target.
In destination-template transfers, the access service compares the source table datatypes to the qualifiers set in the destination-template statement.
For both transfer types, if any columns have incompatible datatypes, the access service cancels the transfer, without attempting to transfer any rows.
Incompatible number of columnsWhen the access service detects an unequal number of columns between the source and the target, a structural error may occur.
For bulk copy transfer:
If the number of source columns exceeds the number of target columns, the access service cancels the transfer.
If the number of target columns exceeds the number of source columns, processing continues if all of the extra columns of the target table accept nulls. If any one of the extra columns in the destination table does not accept nulls, the access service cancels the transfer.
For destination-template transfer:
If the number of columns returned by the sourceselectstatement exceeds the number of question marks in the destination-template transfer statement, the access service cancels the transfer.
If the number of question marks in the destination-template transfer statement exceeds the number of source columns, the keyword null replaces the extra question marks for each row of the transfer.
Value errors occur during transfer processing when the value being inserted has one of the following characteristics:
It cannot be converted to the datatype of the target column.
It is out of range for the target column's datatype.
The access service handles these errors using the following properties:
CharConvertError
NumConvertError
DatetimeConvertError
DefaultDate
DefaultTime
DefaultNum
If the SendWarningMessages property is set to yes, the access service sends a message to the client application when it encounters value errors.
In addition, as mentioned in "Datatype conversion for Transfer processing" , the preceding properties can be used to fill in default values when datatype conversion fails during both types of transfer.
For more information about the configuration properties mentioned here, see Chapter 2, "Configuring the DirectConnect Access Service Library"
For information about values that cause errors for the AS/400 access service during bulk copy transfer, see "Errors from data values" .
|
|