Hello:
I am new to Progress progamming.
I am building a new application but I am have trouble when attempting to update a records (as opposed to writing a new record.
The error message is:
"Unable to find record for db buffer pjt_det during SAVE-ROW-CHANGES. (11912)"
Here is my code (below).
This code works for adding data, but not for updates except when there is but one record in the table.
The error occurs on more than one table, in exactly the same manner.
The error is generated at this line:
"BUFFER ttTotesBefore:SAVE-ROW-CHANGES()."
Any thoughts will be appreciated.
Best,
Quentin Reader.
/* ***************************** */
/* Update Tote records section: */
/* ****************************** */
/* Get a handle on the after-buffer for the totes temp table: */
BUFFER ttTotes:ATTACH-DATA-SOURCE(DATA-SOURCE srcPJTotes:HANDLE).
hAfterBuf = hDSChanges:GET-BUFFER-HANDLE("ttTotes").
IF NOT (ERROR-STATUS:ERROR = hAfterBuf:FIND-FIRST()) THEN
DO:
/* Retrieve the corresponding before-table buffer in this way: */
hBeforeBuf = hAfterBuf:BEFORE-BUFFER.
/* The BEFORE-TABLE and AFTER-TABLE attributes are on the temp-table handles and return */
/* a temp-table handle. The BEFORE-BUFFER and AFTER-BUFFER attributes are on the buffer */
/* handles and return a buffer handle. */
/* The before table is defined on the temp table, in dsPackJackTT.i */
/* We cycle through the buffer on the before table and save changes, as required. */
FOR EACH ttTotesBefore:
BUFFER ttTotes:FIND-BY-ROWID(BUFFER ttTotesBefore:AFTER-ROWID).
BUFFER ttTotesBefore:SAVE-ROW-CHANGES().
END.
hAfterBuf:ACCEPT-CHANGES.
END.
ELSE
.
/* ***************************: */
/* End Update Tote records section: */
/* ***************************: */
I am new to Progress progamming.
I am building a new application but I am have trouble when attempting to update a records (as opposed to writing a new record.
The error message is:
"Unable to find record for db buffer pjt_det during SAVE-ROW-CHANGES. (11912)"
Here is my code (below).
This code works for adding data, but not for updates except when there is but one record in the table.
The error occurs on more than one table, in exactly the same manner.
The error is generated at this line:
"BUFFER ttTotesBefore:SAVE-ROW-CHANGES()."
Any thoughts will be appreciated.
Best,
Quentin Reader.
/* ***************************** */
/* Update Tote records section: */
/* ****************************** */
/* Get a handle on the after-buffer for the totes temp table: */
BUFFER ttTotes:ATTACH-DATA-SOURCE(DATA-SOURCE srcPJTotes:HANDLE).
hAfterBuf = hDSChanges:GET-BUFFER-HANDLE("ttTotes").
IF NOT (ERROR-STATUS:ERROR = hAfterBuf:FIND-FIRST()) THEN
DO:
/* Retrieve the corresponding before-table buffer in this way: */
hBeforeBuf = hAfterBuf:BEFORE-BUFFER.
/* The BEFORE-TABLE and AFTER-TABLE attributes are on the temp-table handles and return */
/* a temp-table handle. The BEFORE-BUFFER and AFTER-BUFFER attributes are on the buffer */
/* handles and return a buffer handle. */
/* The before table is defined on the temp table, in dsPackJackTT.i */
/* We cycle through the buffer on the before table and save changes, as required. */
FOR EACH ttTotesBefore:
BUFFER ttTotes:FIND-BY-ROWID(BUFFER ttTotesBefore:AFTER-ROWID).
BUFFER ttTotesBefore:SAVE-ROW-CHANGES().
END.
hAfterBuf:ACCEPT-CHANGES.
END.
ELSE
.
/* ***************************: */
/* End Update Tote records section: */
/* ***************************: */