Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Raising Young Coders: A Parent’s Guide to Teaching Programming at Home
this week in the
General Computing
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Paul Clapham
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Saloon Keepers:
Tim Holloway
Carey Brown
Roland Mueller
Piet Souris
Bartenders:
Forum:
JDBC and Relational Databases
wrong number or types of arguments in call
nano lad
Greenhorn
Posts: 1
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am still trying to call stored procedure. The procedure is made by other people. The data that I know are:
PKG_SSO CRM4T CREATEUSER I_MS_NB_USUARIO 1 12 VARCHAR2 PKG_SSO CRM4T CREATEUSER I_DS_APELLIDOS 1 12 VARCHAR2 PKG_SSO CRM4T CREATEUSER I_SS_NOMBRE_USUARIO 1 12 VARCHAR2 PKG_SSO CRM4T CREATEUSER I_SS_CONTRASENA 1 12 VARCHAR2 PKG_SSO CRM4T CREATEUSER I_DS_DIRECCION_EMAIL 1 12 VARCHAR2 PKG_SSO CRM4T CREATEUSER I_SN_ID_PERFIL 1 3 NUMBER PKG_SSO CRM4T CREATEUSER I_SN_LV_ESTADO 1 3 NUMBER PKG_SSO CRM4T CREATEUSER I_SN_ID_GRUPO 1 3 NUMBER PKG_SSO CRM4T CREATEUSER I_LN_ID_CUENTA_CANAL 1 3 NUMBER PKG_SSO CRM4T CREATEUSER I_LN_ID_CLIENTE 1 3 NUMBER PKG_SSO CRM4T CREATEUSER I_SN_ID_UNIDAD_ORGANIZADA 1 3 NUMBER PKG_SSO CRM4T CREATEUSER I_SN_ID_VERIFICADOR 1 1111 VARRAY PKG_SSO CRM4T CREATEUSER I_SN_LV_ACCESO_PERMITIDO 1 3 NUMBER
And this is my
Java
code:
public String createUserCRM2 (String userName, String surname, String userLogin, String userPassword, String email, String profile, String state,String grupo, String ctaCanal, String customer, String ou, String verify, String access_allowed, String serverUserName, String serverUserPassword, String driver, String url,String[] ver) throws ClassNotFoundException, SQLException { int nprofile=0, nstate=0, ngroup=0, nctaCanal=0, ncustomer=0, nou=0, nverify=0, naccess_allowed=0,nsgrupo=0; Class.forName(driver); Connection conn = DriverManager.getConnection(url, serverUserName, serverUserPassword); Statement st=conn.createStatement(); st.execute("create or replace type varchar2_t2 is VARRAY(111) of varchar2(12)"); CallableStatement calls = conn.prepareCall("CALL CRM4T.PKG_SSO.CREATEUSER(?,?,?,?,?,?,?,?,?,?,?,?,?)"); calls.setString(1, userName ); calls.setString(2, surname); calls.setString(3, userLogin); calls.setString(4, userPassword); calls.setString(5, email); nprofile = Integer.parseInt(profile); calls.setInt(6, nprofile); nstate = Integer.parseInt(state); calls.setInt(7, nstate);} nsgrupo = Integer.parseInt(grupo); calls.setInt(8, nsgrupo);} nctaCanal = Integer.parseInt(ctaCanal); calls.setInt(9, nctaCanal);} ncustomer = Integer.parseInt(customer); calls.setInt(10, ncustomer);} nou = Integer.parseInt(ou); calls.setInt(11, nou);} ArrayDescriptor ad=ArrayDescriptor.createDescriptor("VARCHAR2_T2",conn); ARRAY ar=new ARRAY(ad,conn,ver); calls.setArray(12,ar); naccess_allowed = Integer.parseInt(access_allowed); calls.setInt(13, naccess_allowed);} //If a parameter type was integer, then we should use the following statement: //System.out.println(); System.out.println(calls.execute()); //Close connection conn.close(); return "OK"; }
and this is the error:
Exception in thread "main" java.sql.SQLException: ORA-06553: PLS-306: wrong number or types of arguments in call to 'CREATEUSER' at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189) at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:242) at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:554) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1478) at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:888) at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2076) at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1986) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2697) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:531) at jazztel.jazztelCRMOperations.createUserCRM2(jazztelCRMOperations.java:237) at jazztel.jazztelCRMOperations.main(jazztelCRMOperations.java:41) Process exited with exit code 1.
can somebody help me?
Thank you.
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
problem in inserting pdf file
Oracle Stored Procedure Problem
SQLException Calling Stored Procedure
invalid host/bind variable name
select with an "in" clause...
More...