on 08-05-2010 6:14 AM
Hi all,
We have Proxy to JDBC scenario in our project. This interface is working fine with unicode data but when there is an apostrophe( ' ) coming in any of the field values ( ex: DOWTHERM 'J' MODEL19QAGB1G ) , the message is failing in receiver JDBC channel.
can anyone please tell us how to handle single quote in JDBC receiver channel.
I have read in SAP help documentation that apostrophe is a reserved character in SQL syntax and is therefore replaced by an escape character if it occurs within value strings. There is a option to JDBC receiver communication channel under "SQL SYNTAX PARAMETER" to specify the escape character for apostrophe.
Can any please tell us which value needs to be maintained in the channel to avoid this error.
Regards
Jagruthi
Hi,
>>>There is a option to JDBC receiver communication channel under "SQL SYNTAX PARAMETER" to specify the escape character for apostrophe.
just select it and leave the default value
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add a condition in mapping that when you receive single quotes ' replace it by two single quotes ''. Note that the last symbol is not a double quote but two single quote. If this doesn't work, add "hasQuot" attribute to your field which should surely work as mentioned below.
/people/prateek.srivastava3/blog/2009/04/02/unicode-handling-for-ms-sql-server
Regards,
Prateek
Hi Prateek,
we have already added hasQuot attribute the database field. Special characters are getting sucessfully inserted into database using this but the message fails if it has single quote (apostrophe) in that field value.
Please suggest if there is any alternative solution.
Regards
Jagruthi
Hi Prateek,
Thanks a lot for you inputs.
This issue is solved now. We have replaced single quote with two single quotes and then did the hasQuote mapping as described in the blog.
/people/prateek.srivastava3/blog/2009/04/02/unicode-handling-for-ms-sql-server
No value needs to be maintained in channel(SQL SYNTAX PARAMETER ).
But just want to understand the difference between replacing the ' with '' in mapping and using SQL SYNTAX PARAMETER option in communication channel.
Both should ideally result in same output. But it didnu2019t work when we tried with two single quotes in SQL SYNTAX PARAMETER (Escape Symbol for Apostrophe) in communication channel without doing anything in mapping.
Regards
Jagruthi
Hi,
Refer this blog...
/people/community.user/blog/2008/05/05/implementing-a-java-mapping-in-sap-pi-to-remove-escape-sequences-from-a-file
Hope this might be helpful for you!!
Regards,
Sainath Chutke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.