Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XMLVarchar PreparedStatement cast specifc encoding

Status
Not open for further replies.

MatthewYoung

Programmer
Jul 11, 2005
2
SE
Using JDBC to insert records into an XML enabled DB2 database with the following SQL:

INSERT INTO RESURS (RESURSTYP,BETECKNING,ALIAS,FROMTSTAMP,TOMTSTAMP,S KAPADID,SKAPADTSTAMP,TSTAMP,XMLDATA) VALUES ('miljö',?,null,?,null,null,current timestamp,current timestamp,DB2XML.XMLVarchar(cast (? as VARCHAR(1000))));

Want to alter the encoding from UTF-8 to ISO-8859-1 but unsure how this is done. The XMLVarcharFromFile function has an encoding parameter but the XML Extender manuals don't seem to cover the case of PreparedStatements setting XML data from a variable with a specific encoding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top