Data Type Changes

 

For the sake of example, we will change the PHONENO field from Text to Integer. Since this type of alteration is not supported using ALTER TABLE, a table rebuild is required. See the Troubleshooting section to avoid numeric overflows and invalid date errors.

The upper row shows current Access field properties, while the lower row shows matching DB2 column properties. The existing DB2 column properties will be replaced with the corresponding Access property.
Access Field (new)
 
DB2 Column (existing)
The Access field and DB2 column names are shown first.
Reason(s) Cannot Use Alter Table
One or more differences between Access fields and corresponding DB2 columns are shown.
Assigned Access Type Vs. DB2
The Access and corresponding DB2 data types are shown.
Length
The Access and corresponding DB2 data type lengths are shown.
Bit Data
If the Access field is of type Binary, the upper value is set to “Yes” or “no” otherwise. When the DB2 data type specifies FOR BIT DATA, the lower value is set to “Yes” or “no” otherwise.
Data Type Conversion Status
This field shows the effect on the column’s data resulting from the data type change. Possible settings are:
Setting Effect on Column Data
Data Safe All existing data will be retained after the operation completes.
Will Lose Data The data type change will result in a loss of all column data.
Possible Invalid Data Errors may be encountered during data type conversion. For example, if a CHAR column is changed to DATE and some existing data in the CHAR column does not represent a valid date, then if the extended UDF conversion functions are activated the column is set to NULL, otherwise the operation is aborted.
May Lose Data Some data may be lost when data in the source column exceeds the size of the target column. For example, CHAR(50) is changed to CHAR(40). If the target column is numeric and the extended conversion functions are activated, then data is retained when the target column is large enough to contain the entire number, otherwise the target column is set to NULL.
Possible Overflow If the extended conversion functions are NOT activated and the target column is not large enough contain the number, the operation will be aborted.
AutoNumber Type
The upper field is checked when the Access column is an AutoNumber type and the lower field is checked when Scriptoria detects that it implemented AutoNumber functionality in DB2 using triggers.
NOT NULL
The upper portion is set to NOT NULL when the corresponding Access “Required” property is set to “Yes” and NULL otherwise. The lower portion is set to the corresponding DB2 column NOT NULL constraint.
Default
The upper portion shows the Access Default Value, the lower portion shows the DB2 Default.
Data Link Features
The upper portion shows any Data Link features assigned to the corresponding Access Hyperlink data type. The lower portion shows current DB2 Data Link features.