Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00306: wrong number or types of arguments
PLS-00306: wrong number or types of arguments [message #35957] Thu, 25 October 2001 11:44 Go to next message
George Larry
Messages: 10
Registered: October 2001
Junior Member
I'm using a PL/SQL procedure to INSERT to my oracle 8i table from a
JSP page.
I'm getting an error- and I suspect it has to do with my 'double'-
because this is working elsewhere with scripts that only insert
strings.
Here's what I've got.
My table:
INVOICEREFNUM NOT NULL NUMBER(10)
INVOICENUM VARCHAR2(50)
VENDOR VARCHAR2(50)
INVOICEDATE DATE
RCVDINTELCOMDATE DATE
INVOICEAMT NUMBER(19,4)
DATESTAMPED DATE

My procedure:
PROCEDURE insertInvoice (
invN IN INVOICE.INVOICEREFNUM%TYPE,
vend IN INVOICE.VENDOR%TYPE,
iNum IN INVOICE.INVOICENUM%TYPE,
invD IN INVOICE.INVOICEDATE%TYPE,
staD IN INVOICE.DATESTAMPED%TYPE,
invA IN INVOICE.INVOICEAMT%TYPE,
recD IN INVOICE.RCVDINTELCOMDATE%TYPE
) AS
BEGIN
INSERT INTO INVOICE ( INVOICEREFNUM, VENDOR, INVOICENUM, INVOICEDATE,
DATESTAMPED, INVOICEAMT, RCVDINTELCOMDATE )
VALUES ( invN, vend, iNum, invD, staD, invA, recD );
END;

My JSP script:
iDoubleTotal = Double.parseDouble( iTotal );
cs = con.prepareCall ("{ call insertServices
( ?, ?, ?, ?, ?, ?, ? )}");
cs.setInt( 1, tNum );
cs.setString( 2, iVendor );
cs.setString( 3, iNumber );
cs.setDate( 4, iSqlDate );
cs.setDate( 5, iSqlStampedDate );
cs.setDouble( 6, iDoubleTotal );
cs.setDate( 7, iSqlReceivedDate );
try {
cs.execute();
out.println( "INSERT completed successfully." );
iNum = Integer.toString( tNum );
} catch ( Exception e ) {
out.println( "The following error occurred: " + e );
}

The following error occurred: java.sql.SQLException: ORA-06550: line
1, column 7: PLS-00306: wrong number or types of arguments in call
to 'INSERTSERVICES' ORA-06550: line 1, column 7: PL/SQL: Statement
ignored

Any idea where the problem is, or how to fix it?
Thank you-

----------------------------------------------------------------------
Re: PLS-00306: wrong number or types of arguments [message #35958 is a reply to message #35957] Thu, 25 October 2001 11:59 Go to previous message
natter
Messages: 3
Registered: October 2001
Junior Member
times like that, i would just make a table with 1 large column and insert everything into that column so you can see what your are trying to do.

or if u can, use dbms_output

my 2cents

----------------------------------------------------------------------
Previous Topic: Re: Date time data type
Next Topic: Documenting advice
Goto Forum:
  


Current Time: Thu Mar 28 13:16:13 CDT 2024