HELP: copy-lob to dynamic-fied

incuboy

New Member
hi guys,

Need some help here. I want if there is a way to have a copy-lob statement which targets a dynamic field.

I tried like this:

COPY-LOB FROM FILE < file path > TO buf-hndl-TempTable:buffer-field(chField).

but this gives me error. incompatible data types. I read the copy-lob help file says
"The target object to receive the copy, which can be a MEMPTR or LONGCHAR variable, a BLOB or CLOB database or temp-table field, or a dynamic expression that resolves to a BLOB or CLOB database or temp-table field. The object data in the specified source object or file is copied to the target object."

Don't know exactly what it means dynamic expression that resolves to a BLOB.

Any help please ...
 
try:

def var lchar as longchar.
COPY-LOB FROM FILE < file path > TO lchar.
buf-hndl-TempTable:buffer-field(chField):FIELD-VALUE = lchar.
 

incuboy

New Member
thanks MaximMonin it works. but I use memptr datatype . i Forgot to specify that i am working on image file. Is that ok? don't know what could have be the implication using memptr..
 
Top