Kbase P46777: Error (450) occurring when dumping or displaying records.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/6/2011 |
|
Status: Verified
SYMPTOM(s):
Error (450) occurring when dumping or displaying records.
SYSTEM ERROR: Cannot read field <field-num> from record, not enough fields. (450)
Corrupt fields exist within some database records and error (450) is occurring.
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
CAUSE:
Record corruption has occurred, but the cause is unknown.
FIX:
You will need to delete, and re-create if possible each corrupt record. You can attempt to dump each corrupt record's fields so that you can get as much information as possible from each record.
You need to use a field list to sequentially get each field prior to the corrupt one/s.
You first need to get a list of the fields and the order in which they are stored within the database. You can do that using the code below. First replace "yourtablename" with the failing table:
FIND _file WHERE _file._file-name = "yourtablename".
FOR EACH _field OF _file BY _field._field-physpos.
DISPLAY _field._field-name
_field._field-physpos.
END.
You can then use the following code to dump all fields prior to the field that is corrupt. You will need to go through this process for each corrupt record.
1. Replace "12345" with the appropriate recid of the record that is failing.
2. Replace "yourtablename" with your failing table.
3. Replace yourfield_1-4 with the appropriate fields from the previous code output. e.g. All fields that are not corrupt:
DEF VAR myrecid AS INT NO-UNDO INIT 12345.
OUTPUT TO VALUE(string(myrecid) + ".txt").
FOR EACH yourtablename FIELDS (
yourfield_1
yourfield_2
yourfield_3
yourfield_4
) WHERE RECID(yourtablename) = myrecid:
PUT UNFORMATTED
"yourfield_1 = " STRING(yourfield_1) chr(10)
"yourfield_2 = " STRING(yourfield_2) chr(10)
"yourfield_3 = " STRING(yourfield_3) chr(10)
"yourfield_4 = " STRING(yourfield_4) chr(10).
END.
You can now delete the bad records using the command:
proutil dbname -C idxfix
You will be presented with a menu, select these options:
Menu Item 6. Delete one record and it's index entries.
It will then ask you to "Type the recid to delete."
It will then ask you to "Type the area for the recid(s)."
Repeat for each recid that is corrupt.
Once this is complete, you can then proceed to re-create your records from scratch using the data obtained earlier or restore it from a old backup that can also contain the good data.