Topic
  • 2 replies
  • Latest Post - ‏2010-05-20T09:16:06Z by SystemAdmin
SystemAdmin
SystemAdmin
532 Posts

Pinned topic Need for Accessing XML Datatype from a table in DB2 to Portlet - Using WPF

‏2010-05-18T12:26:48Z |
I have created an table 'TABLE' in DB2 :

PID INTEGER 4 No
DATEUPDATE DATE 4 No
CLINICINFO XML 0 Yes.

In the above table the CLINICINFO has XML content of userdefined ...

When i used SQL Call bulider to the statment "SELECT * from TABLE".

'xml' content data value is displayed as null ...

How can i get the xml (CLINICINFO) content as an data along with other two fields into the portlet (Using WebSphere Portlet Factory) ...
Updated on 2010-05-20T09:16:06Z at 2010-05-20T09:16:06Z by SystemAdmin
  • DGawron
    DGawron
    251 Posts

    Re: Need for Accessing XML Datatype from a table in DB2 to Portlet - Using WPF

    ‏2010-05-18T13:14:03Z  
    XML columns are handled like LOBs by DB2. By default SQL Call omits LOB columns from the result sets it generates. To have SQL Call include the XML column in its result set you'll need to either convert the XML column's value into a VARCHAR (using the XMLSERIALIZE scalar function) or you'll need to use a custom transform method that adds the column's value into the result set in some meaningful way. The forum contains a number of posts around creating and using custom transforms.

    The XML schema automatically generated for the result set will not cover the XML in the column since SQL Call has no visibility into the content of the column. Depending upon how the data from this column is used this may or may not be a problem. If you intend to display the column's XML using page automation, then you'll need to define a schema for the content.
  • SystemAdmin
    SystemAdmin
    532 Posts

    Re: Need for Accessing XML Datatype from a table in DB2 to Portlet - Using WPF

    ‏2010-05-20T09:16:06Z  
    • DGawron
    • ‏2010-05-18T13:14:03Z
    XML columns are handled like LOBs by DB2. By default SQL Call omits LOB columns from the result sets it generates. To have SQL Call include the XML column in its result set you'll need to either convert the XML column's value into a VARCHAR (using the XMLSERIALIZE scalar function) or you'll need to use a custom transform method that adds the column's value into the result set in some meaningful way. The forum contains a number of posts around creating and using custom transforms.

    The XML schema automatically generated for the result set will not cover the XML in the column since SQL Call has no visibility into the content of the column. Depending upon how the data from this column is used this may or may not be a problem. If you intend to display the column's XML using page automation, then you'll need to define a schema for the content.
    Yes Sir, It is correct i got that in the form of string and started collecting into portlet in the form of XML ...