SQL7919 Data conversion error

Tags:
SQL
VARCHAR
XML
Hi,
I have an embedded SQL program in which I generate an XML element as a VARCHAR(256).
This is done via:
select xmlserialize(      xmlelement(NAME "Name",  'Something')  
                as VARCHAR(256)                          )  
               as XmlResult                                 
                from sysibm/sysdummy1
The SQL statement is run via sqlcursor and I fetch the result into a RPGLE VARCHAR(256)
exec sql prepare S2 from :lSqlSelectStatement;
          exec sql declare C2 cursor for S2;
          exec sql open C2;

          exec sql fetch C2 into :lXml;
Unfortunately I find in my joblog: "Data conversion required on INSERT or UPDATE. "
What am I missing?
Thanks for your help
Mathy Paesen


Software/Hardware used:
I5/OS V7R1
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: