Hot!STRSQL - Insert issue for XML Datatype

Author
sujikuam237
New Member
  • Total Posts : 1
  • Scores: 0
  • Reward points: 100
  • Joined: 2018/04/30 18:26:47
  • Status: offline
2018/04/30 19:26:04 (permalink)
0

STRSQL - Insert issue for XML Datatype

All Tech Gurus: 
 
I have simple SQL table with 2nd field name "Doc" (column as XML Datatype) .. 
When i am trying to enter a XML String to the "Doc" field .. Using Operation Navigator , I am successfully able to enter the values using the command show below. .. but when i am running from Ibm-i SQL (STRSQL) I am getting parsing error .. Any suggestions to resolve this issue .
 
---------------------------------------------------------
Inside Operation Navigator
--------------------------------------------
insert into mylibrary.xmlfile      
(filename,doc) 
Values('test','<test> XXX </test>' )
Statement ran successfully   (484 ms)
1 rows were affected by the statement
--------------
Inside Ibm-i SQL Console(STRSQL)
I get the generic message 
                                                                             
Message ID . . . . . . :   SQ20398       Severity . . . . . . . :   30       
Message type . . . . . :   Diagnostic                                        
                                                                             
Message . . . . :   XML parsing failed.                                      
Cause . . . . . :   The XML parsing failed during SQL processing.  The byte  
  offset into the XML value being processed after conversion to UTF-8 is 0.  
  The XML parser error description is: An invalid XML character (Unicode:    
  0x4c) was found in the prolog of the document.                             
Recovery  . . . :   Correct the XML value.  Try the request again.           
                                                                             
------------------------------------------------------------
#1

0 Replies Related Threads

    Jump to:
    © 2018 APG vNext Invalid Version 5.5