cancel
Showing results for 
Search instead for 
Did you mean: 

DB2 Insertion Ampersend problem:

Senthilprakash1
Participant
0 Kudos

Hi Guys,

I have been stuck up with a problem. we are implementing BPM JDBC to JDBC scenario.

the receiver DB is DB2 (AS400).

The sender side payload contains special Characters like Ampersand (&), now when we try to insert these field into the Revier its giving problem. Below Error occcurs:

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'UIINV' (structure 'Statement1'): java.sql.SQLException: [SQL0104] Token & was not valid. Valid tokens: ) ,.

We have properly converted the source '&' value into '&' .

Below is the Receiver Structure for the Tag which is failing to insert and above error Occurs:

Actual Data for the field is CKQ-QUART-COOKIES&CREAM .

In the XML payload we have converted the value into below format:

<INDESC hasQuot="no">U&'CKQ-QUART-COOKIES&amp;CREAM'</INDESC>

This is not inserting into the DB and above exception is occuring in the Adapter Level.

Regards,

Senthilprakash.

Edited by: senthilprakash selvaraj on Dec 12, 2008 2:49 PM

Edited by: senthilprakash selvaraj on Dec 12, 2008 2:50 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Senthilprakash,

Here is the solution of your problem :[Handling Special Characters in XI|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420] [original link is broken] [original link is broken] [original link is broken];

Let me know if you dont understand any part of the weblog.

Thanks,

Pooja

Answers (1)

Answers (1)

former_member181985
Active Contributor
0 Kudos

Hi,

& is a special character in XML hence use &amp; instead of &.

Check this link.

[http://www.devx.com/tips/Tip/14068]

Thanks,

- Gujjeti.