Consultor Eletrônico



Kbase P117958: BUFFER-COMPARE returns invalid result if records contains LOB fields
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.x

SYMPTOM(s):

BUFFER-COMPARE returns invalid result if records contains LOB fields

Using database table or temporary table

Comparing two records that contain BLOB or CLOB fields

BLOB fields contain different data

Using BUFFER-COMPARE in 4GL

Records compare the same

BUFFER-COMPARE returns TRUE

CAUSE:

Bug# 20060814-004

FIX:

Upgrade to OpenEdge 10.1B or later.

As a workaround, access the LOB field(s) of the records before using BUFFER-COMPARE. For example, assuming that the record contain a field iBlob of type BLOB, then you can change the following code: IF hB1:BUFFER-COMPARE(hB2) THEN
MESSAGE "Problem: buffers compare the same" VIEW-AS ALERT-BOX.
ELSE
MESSAGE "OK: buffers compare different" VIEW-AS ALERT-BOX. to: /* Access the fields prior to the comparison */
iNotUsed = LENGTH(hB1:BUFFER-FIELD('iBlob'):BUFFER-VALUE) +
LENGTH(hB2:BUFFER-FIELD('iBlob'):BUFFER-VALUE).

IF hB1:BUFFER-COMPARE(hB2) THEN
MESSAGE "Problem: buffers compare the same" VIEW-AS ALERT-BOX.
ELSE
MESSAGE "OK: buffers compare different" VIEW-AS ALERT-BOX.