• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Wrong no or type of argument in line 1, column 7

 
Ranch Hand
Posts: 397
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have used 9 parameter in procedure , below is signature.

MNC.mplsuk_create_bulk_vc_pvc(in_request_type in varchar2,
in_acvp_ckt_name in varchar2,
in_port_type in varchar2,
in_port_no in varchar2,
in_chk_all_param in number,
in_create_bulk_vcpvc in t_create_bulk_vcpvc,
out_result_vc_pvc out t_result_vc_pvc,
out_status_code out number,
out_status_message out varchar2) as


String query = "{call mplsuk_create_bulk_vc_pvc(?,?,?,?,?,?,?,?,?)}";
cstmt = this.getConnection().prepareCall(query);
ArrayDescriptorDAO adDAO = new ArrayDescriptorDAOImpl(this
.getConnection());

ARRAY saveArrayBulkVcPVC = adDAO.getArrayDescriptor("DBSEC.T_CREATE_BULK_VCPVC",
listTo2DArrayBulkVcPvcDetails(bulkVcPvcDetailsList));
System.out.println("saveBulkVcPvcDetails after saveArrayBulkVcPVC ");
cstmt.setString(1, requestType);
cstmt.setString(2, AcVpCktName);
cstmt.setString(3, portType);
cstmt.setString(4, portNo);
cstmt.setInt(5, checkAll);
cstmt.setArray(6, saveArrayBulkVcPVC);

cstmt.registerOutParameter(7, OracleTypes.CURSOR);
cstmt.registerOutParameter(8, OracleTypes.INTEGER);
cstmt.registerOutParameter(9, OracleTypes.VARCHAR);
cstmt.execute();

while executing my code i am getting this error:
wrong no or type or argument , while i checked arguments are correct in type and no.

could any one help me where this code is wrong,

my 6th in parameter is table type and 7th parameter is also table type.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recommend removing parameters from the stored proc and JDBC code to identify which one it is. And then reply asking why for that one.
 
Prabhat Ranjan
Ranch Hand
Posts: 397
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey man,

i am 100 % correct, the problem is not like wrong no and type of arguments but its out parameter as table type which is wrong.

out parameter in database never be as table type, it should be only cursor, boolean,number or varchar..

we have changed in backend proc from table type out parameter to ref cursor and then problem resolved.
 
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Prabhat, please use code tagsvin your first post..
 
Prabhat Ranjan
Ranch Hand
Posts: 397
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Prabhat Ranjan wrote:Hi All,

I have used 9 parameter in procedure , below is signature.


while executing my code i am getting this error:
wrong no or type or argument , while i checked arguments are correct in type and no.

could any one help me where this code is wrong,

my 6th in parameter is table type and 7th parameter is also table type.

reply
    Bookmark Topic Watch Topic
  • New Topic