IBM Support

how to insert a BLOB in a DB2 custom table using the LW JDBC adapter *|* -D9BC905527DFB3228525791900064D90- *|*

Question & Answer


Question

how to insert a BLOB in a DB2 custom table using the LW JDBC adapter *|* -D9BC905527DFB3228525791900064D90- *|*

Answer

Technote (FAQ)


Question

how to insert a BLOB in a DB2 custom table using the LW JDBC adapter

Answer

This is possible using the LW JDBC Adapter.

You need to specify the parameter type to be "BinaryStreamFromDocument" this is the correct data type for BLOB.

The type "CharacterStreamFromDocument" should only be used for CLOB columns but not for BLOB.

You also need to add a line in the BPML indicating the Path to the Primary Document in the Process data. So the BPML should look like the sample below:

????? <operation name="MyLightweightJDBCAdapter">
??????? <participant name="MyLightweightJDBCAdapter"/>
??????? <output message="LightweightJDBCAdapterTypeInputMessage">
????????? <assign to="param1" from="My_TAG/_INSTANCE/text()"></assign>
????????? <assign to="param2" from="My_TAG/CODE_TRACE/text()"></assign>
????????? <assign to="param3" from="partie1/text()"></assign>
????????? <assign to="param4" from="partie2/text()"></assign>
????????? <assign to="paramtype1">String</assign>
????????? <assign to="paramtype2">String</assign>
????????? <assign to="paramtype3">String</assign>
????????? <assign to="paramtype4">String</assign>
????????? <assign to="paramtype5">BinaryStreamFromDocument</assign>
????????? <assign to="pool">MyDB2pool</assign>
????????? <assign to="query_type">INSERT</assign>
????????? <assign to="result_name">result</assign>
????????? <assign to="row_name">row</assign>
????????? <assign to="sql" from="sci-get-property('p24_params''myinsertquery.trace')"></assign>
??????? <assign to="PrimaryDocument" from="PrimaryDocument/@SCIObjectID"></assign>
????? </output>
????? <input message="inmsg">
??????? <assign to="." from="*"></assign>
????? </input>
??? </operation>

Cross reference information
SegmentProductComponentPlatformVersionEdition
CommerceSterling B2B IntegratorAdapters

Historical Number

HTG2144

[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SS73G6","label":"Sterling Total Payments for Financial Services"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
13 October 2021

UID

ibm10770687