Change non-structural fields of _File and _Field online
- Last Updated: March 30, 2020
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
The non-structural fields of the _File and _Field tables may now be changed while the database remains running. Such changes no longer require an exclusive schema lock.
| Schema Table | Field/Column Name |
|---|---|
_Field |
_Field._Col-label-SA |
_Field |
_Field._Col-label
|
_Field |
* _Field._Fld-case
|
_Field |
_Field._Format-SA
|
_Field |
_Field._Format
|
_Field |
_Field._Help-SA
|
_Field |
_Field._Help
|
_Field |
_Field._Label-SA
|
_Field |
_Field._Label
|
_Field |
* _Field._Valexp
|
_Field |
_Field._Valmsg-SA |
_Field |
_Field._Valmsg
|
_Field |
_Field._View-As _Field._Width |
_File |
_File._File-Label-SA |
_File |
_File._File-Label
|
_File |
* _File._Valexp
|
_File |
_File._Valmsg-SA |
_File |
_File._Valmsg |
Effect on ABL applications
Unless users recompile their r-code, they will not see the
effect of changes to non-structural fields.
For example, if an r-code is compiled before the column label is changed, then the old column label continues to appear until the r-code is recompiled. This does not affect how the business logic executes.
A recompilation of the r-code might be necessary for any changes to fields marked with an asterisk (*). If an affected field is referenced in the r-code, the r-code may execute differently. In this instance, any ABL application logic (r-code) that references these changed fields must be recompiled.
For example, if you modify the Valexp field
in the _Field schema table, the AVM continues to execute the older validation
expression until the r-code that accesses the
database is recompiled.
Effect on transactional concurrency
- Changing non-structural fields in the
_Fileand_Fieldtables do not require exclusive access to the database. - Concurrent schema transactions are not allowed.
- During the short period of time that the schema change transaction is in process, new database logins and schema readers will be blocked until the transaction completes.
Options to change the schema fields
_File and _Field schema tables using any one of the following options:- Make the change in a development database and then load the
delta.dffile into the schema online using the data dictionary tool. Be sure to check the Add new objects on-line box. - Use
ALTER TABLEorALTER COLUMN(in OpenEdge SQL) - Update the schema directly using
ABL, as in the example below
Example
Customer Number using ABL:
|
The following is an example of changing the label of the custNum column to Customer Number using SQL:
ALTER TABLE Pub.Customer ALTER COLUMN CustNum SET PRO_COL_LABEL ‘Customer Number’;
ALTER TABLE Pub.Customer ALTER COLUMN CustNum SET PRO_COL_LABEL ‘Customer Number’;
Notes
- Non-structural fields do not affect the structure of the associated database tables when changed.