Consultor Eletrônico



Kbase P96863: Database updates rejected unexpectedly
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/19/2010
Status: Verified

SYMPTOM(s):

ADM2

SDO with non-updateable fields

Saving record change

Non-updateable field was modified in database by other user or process

The following error occurs:

Field(s) have been changed by another user. Your change has been rejected. Update Cancelled.

FACT(s) (Environment):

Progress 9.1x
OpenEdge 10.0x
All Supported Operating Systems

CAUSE:

Enhancement Request# OE00110549

CAUSE:

The current behavior is that any change in the database to one of records in the SDO will cause the update to be rejected, even in situations where using 'dirty' data does not pose a risk to data integrity (such as a read-only field that is retrieved only for quick reference and has no impact on the business logic).

FIX:

The purpose if this enhancement request is to give Developers more control over which read-only fields are considered relevant when saving modifications to the database - basically they should be allowed to specify for which fields dirty data is acceptable so changes to those fields by other users to not stop the record update.

It has not yet been implemented.

It is possible to workaround the current behavior by using a BeginTransactionValidate procedure.
This procedure should synchronize the fields that should be ignored in the RowObjUpd temp-table with the current fields in the database, which in turn will allow the changes to pass the check for changed data.

For example:

PROCEDURE BeginTransactionValidate:

FOR EACH RowObjUpd:
FIND customer WHERE ROWID(child) = TO-ROWID(RowObjUpd.Rowident) NO-LOCK.
ASSIGN RowObjUpd.comments = customer.comments.
END.

END.