Salesforce

Creating a record errors with bffld: nxtfld: scan past last field

« Go Back

Information

 
TitleCreating a record errors with bffld: nxtfld: scan past last field
URL NameP72895
Article Number000156746
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
Creating a record errors with bffld: nxtfld: scan past last field

DBRPR scan shows Invalid data block found  Reason: Bad entry count.
Steps to Reproduce
Clarifying Information
There was change was made in OpenEdge 10.0A that caused this array to be in the field's relative position (rpos)  order when a database was conv910,  fixed in 10.0B [ 20040319-021 ]
Error MessageSYSTEM ERROR: bffld: nxtfld: scan past last field. (16)
Defect Number
Enhancement Number
Cause
The problem deals with checking for mandatory fields for a new (or presumably an updated) record.
  • An array ("mand") gets constructed and kept in memory, one array element for each mandatory field of a table.
  • The algorithm that checks for mandatory fields relies on the array being in order by the field's physical position (phys pos) 
  • If the rpos order does not collate the same as the phys pos order, this error will result.
The root cause is unknown but may be related to the historical conversion of this database since version 9 to the current OpenEdge 12 release.
Resolution
Change _field-rpos for all fields in each table where the issue exist such that they have the same order as _field-physpos:

Use the following code to display the current _field-physpos _field-rpos values.
 
FOR EACH _file where _file-name = "<tablename>":
    FOR EACH _field of _file by _field-physpos:
        DISPLAY _field-name _field-physpos _field-rpos.
    END.
END.

Use the following code to make both values match.
FOR EACH _file WHERE _hidden = no:
    FOR EACH _field OF _file:
        _field-rpos = _field-rpos + 100.
    END.
END.

FOR EACH _file WHERE _hidden = no:
    FOR EACH _field OF _file:
        _field-rpos = _field-physpos.
    END.
END.
Alternatively dump and load the database.
Workaround
Notes
Keyword Phrase
Last Modified Date8/19/2021 9:06 AM

Powered by