The Artima Developer Community
Sponsored Link

Java Answers Forum
passing String array from Java to Stored Procedure in Oracle

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Johny Byron

Posts: 1
Nickname: johnybyron
Registered: Oct, 2018

passing String array from Java to Stored Procedure in Oracle Posted: Oct 28, 2018 4:47 PM
Reply to this message Reply
Advertisement
We are passing String Arrary from Java to Oracle 9i Stored Procedure. We are getting following error :

java.sql.SQLException: Non supported character set: oracle-character-set-46

Below is the code :
DataSource ds =SQLConnect.getDataSource();
Connection conn = ds.getConnection();
Connection nativeConnection = (Connection)WSJdbcUtil.getNativeConnection((WSJdbcConnection)conn);
CallableSta tement cs = null;
nativeConnection.setAutoCommit(true);

String strArray[] = {"Account","Marketing"};
cs=conn.prepareCall("{ call GDR_DATA.TEST_PARAMETERS(?) }");
ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("GDR_DATA.T_TEST", nativeConnection);

ARRAY array_to_pass = new ARRAY(descriptor, nativeConnection, strArray);
cs.setArray(1,array_to_pass);
cs.execute();

we have included utils.jar, rsadapterspi.jar , classes12.zip and ns_charset12.zip in the build path

Any help will be greatly appreciated

Topic: Why is the Text in the JTextArea getting replaced instead of getting added? Previous Topic   Next Topic Topic: getting a copy of Objects and Java book

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use