Other Table Concepts

Importing a table definition creates a definition with LANSA columns representing the columns in the table. The columns may be existing columns or they may be created when the table definition is imported. Existing columns are only used if there is an exact match of the column name, data type, length, number of decimals, etc. Any variation from existing columns will cause a new column to be created.

Some native database types are not supported by LANSA, and the Import table process will automatically skip importing columns of these types. If you will be inserting data into the table via LANSA applications, you must ensure that these skipped columns have a default at the database level.

If the primary key contains a skipped column, an IBM i Table will usually be defined in LANSA with no primary key. For Windows Imported tables, if another unique index exists, this may be imported as the primary key and may also be imported as an index.

If an index has a skipped column as one of its keys, the index will not be imported.

When importing a definition into an RDMLX-enabled partition, the full range of column types supported by LANSA is available, regardless of the Available field types in the partition maintenance dialog. This allows you to automatically use the full features of LANSA to support Imported tables, without having to be concerned about developers using new field types in other applications.

Occasionally, you may find that the Table Import creates a column that is not the type or length you expect, or perhaps you expected it to reuse an existing column. The solution is to add a virtual column to the table that converts the imported column to what you expected. These columns will be preserved if the table definition is reimported.

When importing DateTime columns in an RDMLX-enabled partition, the Import process assumes that the column will be stored and displayed in the local time zone. If this is not the case, add the SUTC and/or DUTC attributes to the column. For further details, refer to DateTime in the Technical Reference Guide.

After Importing table defintions, you may change keyboard shift settings for some Imported table columns. To do this, just open them in the LANSA Editor, go to the Field Definition tab and select the suitable keyboard shift values for them.

LANSA cannot make use of an Imported table that contains only columns of type BLOB or CLOB, as it requires other columns to be used to query the BLOB or CLOB columns.

When importing tables, LANSA will recognize an Identity (Autonumber) column if one exists on the table. Refer to Identity columns.

There are many database and table-specific reasons why a column or table cannot be inserted or updated. If you attempt to update or insert a row into an Imported table, and an error not related to LANSA is returned, you need to investigate the cause. Validations that the database may perform are not checked by LANSA and so the database may reject the data with a fatal error. Rules should be added to LANSA to perform these checks. If the cause cannot be avoided from within LANSA, you will only be able to read the table. For Imported tables, you may delete a problematic column from the table definition, or mark the table as allowing read access only.

Also See

PC Other Tables

IBM i RDMLX Other Tables

1.6.11 LANSA Internal Tables