|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Passing arrays to an Oracle stored procedure: encoding |
« View previous topic :: View next topic » |
Author |
Message
|
gisly |
Posted: Mon Oct 06, 2014 10:01 pm Post subject: Passing arrays to an Oracle stored procedure: encoding |
|
|
Apprentice
Joined: 10 May 2012 Posts: 29
|
Hi!
I've got to pass an array of strings to an Oracle stored procedure calling it from Message Broker v. 7. As far as I can understand, I can't do it using ESQL, so I'm using Java.
I've found an example on http://viralpatel.net/blogs/java-passing-array-to-oracle-stored-procedure/.
This is how they create the array:
Code: |
Connection con = DriverManager.getConnection("jdbc:oracle:thin:url ","UserName","Password");;
String array[] = {"one", "two", "three","four"};
ArrayDescriptor des = ArrayDescriptor.createDescriptor("SchemaName.ARRAY_TABLE", con);
ARRAY array_to_pass = new ARRAY(des,con,array); |
The only difference in my code is that I get the connection in the Broker's way:
Code: |
Connection con = getJDBCType4Connection(JDBCProviderName,JDBC_TransactionType.MB_TRANSACTION_AUTO); |
However, this line
Code: |
ARRAY array_to_pass = new ARRAY(des,con,array); |
throws a java.sql.SQLException: Non supported character set: oracle-character-set-171
I've got Oracle 10, and its charset is UTF-8.
I've tried adding nls_charset12.jar and/or orai18n.jar to the shared classes directory, but it doesn't help.
Has anyone come across the same issue? Is there any way to call the procedure? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 07, 2014 5:01 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It might be easier to add a stored procedure that accepts a delimited string and turns it into an array and then calls the real procedure. |
|
Back to top |
|
 |
gisly |
Posted: Sat Oct 11, 2014 3:34 am Post subject: |
|
|
Apprentice
Joined: 10 May 2012 Posts: 29
|
Thanks, that's what we actually ended up doing. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|