Resolved Adding Field to an existing Database Table - Procedural Errors


New Member
This is my first time altering one of our existing database tables. My predecessor taught me everything I know, and he is no longer working with our company. We briefly touched on the altering of existing database tables, and what I took away from that talk was: Every file that references the altered database table will have to be recompiled to understand the new structure of the database table. I made changes to the database table and recompiled all of our procedures that referenced the table. However, the program is not working and producing errors on execution.

Receiving the following Errors:
"SYSTEM ERROR: Cannot read field 24 from record, not enough fields. (450)"
"SYSTEM ERROR: Failed to extract field 24 from (table name) record (table 317) with recid 103320. (3191)"
"Couldn't extract field '(new field name)' from source in a BUFFER-COPY statement. (5367)

I am receiving these errors indefinitely upon execution of the procedure. I am at the end of my current knowledge and am asking for some wisdom on the subject. Aside from just removing the changes to the table.

I am using Openedge 10.1C, I am using Progress DB Navigator - Openedge Architect 10.1C, and the App Builder 10.1C compiler program that comes with it.


New Member
I fixed the issue. I created the column in the table using this statement: alter table pub."rd-document" add column "owner" varchar(10).
This gave me a correct column in the correct format that I was expecting. However, it assigned the character value of the table to <NULL>.

In order to fix my issue, I had to replace the <NULL> value of each record with a '' (or blank) value. My procedure was trying to create a buffer of the table, but was not allowed to assign a character variable with <NULL> - As <NULL> is only typically used with date variables.

In the future I will need to alter my original SQL argument to include an initial value of '' (or blank). Hopefully this will help someone out who might have had the same problem.


You really shouldn't use SQL to make schema changes. SQL alter table statements "work" but you are asking for weird side-effects. Especially with something as ancient, obsolete and unsupported as 10.1C. The natural way to modify the schema of an OpenEdge database is with the data admin tool and by generating "df" files.

Speaking of which... since you have demonstrated that you can compile all of your code you have absolutely no defense whatsoever for still running 10.1C. You need to upgrade to a modern release, such as 11.7 or 12.2 (available very soon) ASAP. 10.1C is dreadfully old, full of bugs, woefully insecure, and criminally irresponsible to be running.