Consultor Eletrônico



Kbase P125422: CRC error after adding a new field to an existing table.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/07/2008
Status: Unverified

SYMPTOM(s):

CRC error after adding a new field to an existing table.

Adding a new field and a new index online. Compiled code fails to run due to CRC error 1896.

** CRC for <table> does not match CRC in .p. Try recompiling. (1896)

Adding a field to a table "online" changes the CRC of the table and prevents any previously compiled code from running even when the field is not referenced in the code.

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x

CAUSE:

Bug# OE00149133

FIX:

Upgrade to OpenEdge 10.1C or later.

Even if the CRC has changed after adding a new field to the table, the old R-code will still run as long as the _Field-rpos value of the new field is greater than the current high _Field-rpos value for the table.
For example, suppose there is a table with three fields A, B, and D whose respective _Field-rpos values are 2, 3, and 5. If a new field, C, with _Field-rpos 4 is added, the old R-code will need to be re-compiled.
If the _Field-rpos is set to something > 5 (the Data Dictionary does this by default when a field is added), the old R-code would have run, even though the CRC changed.


All the usual Schema changes will still affect the CRC for a table. The difference is that in 10.1C or later versions, when a R-code that has a different CRC for a table is run, a second check is made to see if the old R-code will still run.
Here are the changes to a table that will make it impossible of run old R-code:

1) Deleting a field from the table

2) Changing the _Field-rpos for a field

3) Changing the _Field-name for a field

4) Changing the _Extent or _Data-type of a field (Progress does not allow you to change these directly; they would have to delete the field and add it back in with the changed data type or extent)

5) Adding a new field and setting the _Field-rpos to a value less than the current high _Field-rpos value for the table.