Hi everyone,
i am trying to store part of an xml message as data into a database. the
message is too big to fit into a varchar column, so i am trying to use a 1MB
blob. i get an error that i am trying to insert a null value into a not null
column. the xml and code follows:
xml:
<?xml version="1.0"
encoding="UTF-8"?><Message><SystemId>WAS1</SystemId><Body><Content><exceptio
nDetail><timeStamp>2003.08.15 05:16:59</timeStamp><message>External
Reference Error</message></exceptionDetail></Content></Body></Message>

code:
DECLARE bContent BLOB;
SET bContent = CAST(BITSTREAM(InputRoot.XML.Message.Body.Content)
AS BLOB CCSID InputRoot.MQMD.CodedCharSetId ENCODING
InputRoot.MQMD.Encoding);
INSERT INTO Database.GLL0905.MESSAGEB (CONTENTB) VALUES (bContent);

How do i store everything inside <Content> into a blob/clob column?
Why is a clob type not supported in mqsi when it is in db2.

why does the following statement result in an empty row in the database?
INSERT INTO GLL0905.MESSAGEC(CONTENTC) VALUES('&lt;Message
Type=&quot;audit&quot;&gt')

I am running mq 5.3, mqsi 2.1, db2 7.2 on win2000.

Thanks
=================================
Graham Lekota
Systems Integration Support,
Liberty Group, www.liberty.co.za
+27 11 4084 683, +27 83 3273 619
=================================



*******************************************************************

The e-mail and attachments are confidential and intended only for selected recipients. 
 If you have received it in error, you may not in any way disclose or rely on the 
contents.  You may not keep, copy or distribute the e-mail. Should you receive it, 
immediately notify the sender of the error and delete the e-mail.Also note that this 
form of communication is not secure, it can be intercepted, and may not necessarily be 
free of errors and viruses in spite of reasonable efforts to secure this medium.

*******************************************************************

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Reply via email to