ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Passing arrays to an Oracle stored procedure: encoding

Post new topic  Reply to topic
 Passing arrays to an Oracle stored procedure: encoding « View previous topic :: View next topic » 
Author Message
gisly
PostPosted: Mon Oct 06, 2014 10:01 pm    Post subject: Passing arrays to an Oracle stored procedure: encoding Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 07, 2014 5:01 am    Post subject: Reply with quote

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
View user's profile Send private message
gisly
PostPosted: Sat Oct 11, 2014 3:34 am    Post subject: Reply with quote

Apprentice

Joined: 10 May 2012
Posts: 29

Thanks, that's what we actually ended up doing.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Passing arrays to an Oracle stored procedure: encoding
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.