aspose file tools*
The moose likes JDBC and the fly likes Wrong no or type of argument in line 1, column 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Wrong no or type of argument in line 1, column 7" Watch "Wrong no or type of argument in line 1, column 7" New topic
Author

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

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
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.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30928
    
158

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
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.
Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

Prabhat, please use code tagsvin your first post..


Java Experience
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wrong no or type of argument in line 1, column 7