I have embedded sql query to iseries in the Java program which is throwing the following error -
"[SQL0332] Character conversion between CCSID-id 1156 and 278 is not possible.".
I am facing this problem with only one library but not all.
Working query:
select * from SRBKTO where KOACNO=721
Not-working query:
select * from SRBKTO where KOACNO= '721' (This works for other libraries)
If I try to hit the query with conditional clause with quotes (String or int type), the error is thrown.
I do not have great knowledge on iSeries. What I understood is that there is a conversion problem for the character " ' "
(as of now I guess only for that char) from the CCSID 1156 to 278.
I tried java API com.ibm.as400.access.AS400.setCcsid(1156) of jt400native jar to set the source CCSID to the connection object which didn't result in anything. Is it required to change the target CCSID? Can anyone please suggest a way to resolve this?