cancel
Showing results for 
Search instead for 
Did you mean: 

Picture to JDBC adapter.

former_member192375
Participant
0 Kudos

Hi,

I need to send a picture to a Database table. Please can you assist? How do I get the picture into the SQL query.

Your assistance in this regard will be highly appreciated.

Regards

Willie Hugo

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member192375
Participant
0 Kudos

We will be coding a JAVA proxy to do this. This then will allow us to reuse the solution, which will not be the case with a mapping.

former_member181985
Active Contributor
0 Kudos

Hi Willem,

Check my new Blog: [SAP XI/PI: Storing BINARIES (Images, PDFs etc.) in the Database (BLOBs) Using JDBC Adapter|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/18494] [original link is broken] [original link is broken] [original link is broken];

Regds,

Praveen Gujjeti.

former_member192375
Participant
0 Kudos

Raj,

Please can you elaborate of how you would map the picture, using the PI Message Mapping, to the JDBC Insert Query? I just can not visualize this in my mind.

May thanks for your quick reply.

Regards

Willie Hugo

former_member181985
Active Contributor
0 Kudos

The binary data for BLOB should be hexadecimal encoded. You can acheive this using some javacode as suggested by sekhar.

[http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm]

The rest JDBC adapter will take.

Check this link for sample java code..........

[http://www.example-code.com/java/bytearray_encoding.asp]

byte[].getEncoded("hex")

Edited by: Praveen Gujjeti on Mar 24, 2010 2:50 PM

Edited by: Praveen Gujjeti on Mar 24, 2010 3:14 PM

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Follow below steps.

1)Create PICTURE/IMAGE field in Data base as a BLOB field,which stores larged sizes.

Then in PI use INSERT query to insert data in Data base.

or

Use UDF or JAVA Mapping to insert Data.

Regards,

Raj