Consultor Eletrônico



Kbase P139051: = BASE64-DECODE doesn't error on the assignment but on any subsequent COPY-LOB statement on 10.1C01
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   30/12/2008
Status: Unverified

SYMPTOM(s):

<blob-column> = <temp memptr returned by> BASE64-DECODE doesn't error on the assignment but on any subsequent COPY-LOB statement on 10.1C01

On 10.1C01, COPY-LOB yields error 11269 - Could not retrieve length of Blob to read. (11269).

On 10.1C and 10.1C02 you can point the result of a BASE64-DECODE to a BLOB

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.1C01 Service Pack

CAUSE:

Bug # OE00179323

FIX:

Upgrade to 10.1C02 or later.
Workaroud:
Example -
DEF VAR lcLongChar AS LONGCHAR.
DEF VAR mPtr AS MEMPTR.
DEF VAR mPtr2 AS MEMPTR.
DEF TEMP-TABLE ttTemp NO-UNDO
FIELD bBlob AS BLOB.
/* get the image */
COPY-LOB FILE "blob.tif" TO mPtr. /* any image will do */
/* base64 encode it */
lcLongChar = BASE64-ENCODE(mPtr).
CREATE ttTemp.
/* this works on 10.1C, 10.1C02 */
ASSIGN ttTemp.bBlob = base64-decode(lcLongChar).
COPY-LOB FROM ttTemp.bBlob TO FILE "something.tif".
/* BUT you have to do the following on 10.1C01. Above COPY_LOB yields error 11269*/
ASSIGN mptr2 = BASE64-DECODE(lcLongChar).
COPY-LOB FROM mptr2 to ttTemp.bBlob.
COPY-LOB FROM ttTemp.bBlob TO FILE ?something.tif".

/* leave it tidy */
set-size(mPtr) = 0.
set-size(mptr2) = 0.