Consultor Eletrônico



Kbase P188335: Newly created record is available before transaction ends when BLOB or CLOB field is assigned using
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   25/05/2011
Status: Unverified

SYMPTOM(s):

Newly created record is available before transaction ends when BLOB or CLOB field is assigned using COPY-LOB.

Record is available and non-LOB field values are assigned before COPY-LOB has completed.

FACT(s) (Environment):

CREATE, ASSIGN of non-LOB values, and COPY-LOB are all in the same transaction.
All Supported Operating Systems
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)

CAUSE:

This is expected behavior. Usually a newly created record is not written to the database until either indexed fields are assigned or until the record goes out of scope or the enclosing transaction ends. COPY-LOB causes the record to be written before the COPY-LOB is processed. Because LOB data is not cached, it is necessary to have the ROWID of the record that parents the LOB data immediately.

FIX:

Do not assume that if the record is available, all data including LOB data has been written. In the case of LOB data, this may not be true. Use some other means, such as a byte count, to test whether COPY-LOB has completed.