Search code examples
openedgeprogress-4gl

Progress 4GL - What are certain changes that have no effect/effect on CRC?


I am new to progress 4GL and I would like to what are certain changes that have effect/no effect on CRC?

What happens when I load newly xxbd_det.df file for the first time in db and compile .p? What happens when I delete the same xxbd_det.df file and reload it again in same db? CRC value in already existing .r will be matched with table xx ?


Solution

  • This is a complex topic with OpenEdge version dependent subtleties so I will stay very high level.

    1. There is not a single CRC relating r-code to the db anymore. That, thankfully, stopped being the case 30 or so years ago.

    2. Adding tables, fields, and indexes does not invalidate existing r-code in any modern release. Existing r-code will not be able to use new objects but they also don't break anything.

    3. Having said that, dynamically coded queries can reference new objects. Because they are dynamic the compiler doesn't get to enforce anything about matching CRCs.

    4. If you remove an object (delete a table, field or index) r-code that references that object will fail. You must re-compile such r-code. In the case of indexes a different index will be chosen by the compiler. Deleted tables and fields will require you to modify the code.

    5. Changing certain attributes doesn't break anything (for example changing a field's FORMAT).

    6. Renaming things will break your code.

    7. Replacing a deleted object with a new object that has the same name and makeup (the second part of your question) will probably not require a recompile but I wouldn't want to make a habit of it.