Use TABLE-HANDLE with the WRITE-XML function

bruestle2

New Member
Background: I have a TABLE-HANDLE passed into my function and I want to convert the data it contains into a BLOB so it can be passed around in another table. I wish to achieve this by creating an XML document from the TABLE-HANDLE, saving it as a longchar and converting it to a blob.

I can get it to work with a temp-table (like below), but it does not work with a table-handle. Can I retrieve the temp-table using the table-handle, or is there a different way I can use WRITE-XML to achive this goal?

Code:
rc = TEMP-TABLE tt-test:WRITE-XML("longchar",tmpLongchar,TRUE,"UTF-16",?,false,false).
COPY-LOB FROM tmpLongChar TO listparameters.paramblob NO-ERROR.
 
How do you pass the handle - you didn't provide the code ...

Maybe the handle does not point to what you think it is pointing. Plus, the WRITE-XML also works with a buffer handle. Did you try the buffer handle?

Heavy Regards, RealHeavyDude.
 
def var htable as handle
htable = TEMP-TABLE tt-test:HANDLE.
rc = htable:WRITE-XML("longchar",tmpLongchar,TRUE,"UTF-16",?,false,false).
 
Back
Top