Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01460 Oracle9i

Re: ORA-01460 Oracle9i

From: harp <hmetu_at_gmx.net>
Date: 9 Feb 2005 10:10:57 -0800
Message-ID: <1107972657.369358.144220@z14g2000cwz.googlegroups.com>


char firstname[25];
char familyname[25];
char address[25];
char telno[7];
char firm[25];
char *comp = "compName";
SQLINTEGER firstnameId;//other Ids are from same type //....
After much readings I changed this
AnsiString stmt = "{CALL ODBCRefCus.spEmpCus(?)}"; into
AnsiString stmt="CALL ODBCRefCus.spEmpCus(?,?,?,?,?)"; And added:

ret = SQLBindParameter(hstmt,1,SQL_PARAM_OUTPUT,SQL_C_CHAR,SQL_C_CHAR, sizeof(firstname),0,firstname,0,&firstnameId);

ret = SQLBindParameter
(hstmt,2,SQL_PARAM_OUTPUT,SQL_C_CHAR,SQL_C_CHAR,sizeof(familyname),0,familyname,0,&familynameId);

ret = SQLBindParameter(hstmt,3,SQL_PARAM_OUTPUT,SQL_C_CHAR,SQL_C_CHAR, sizeof(address),0,address,0,&address);

ret = SQLBindParameter(hstmt,4,SQL_PARAM_OUTPUT,SQL_C_CHAR,SQL_C_CHAR, sizeof(telno),0,telno,0,&telnoId);

ret = SQLBindParameter(hstmt,5,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_C_CHAR, sizeof(comp),0,comp,0,&sqlnts);

Now, when I try to compile, I get the message like this:
"ORA-06553: PLS-306 wrong number or type of arguments in the call of
spempcus". I can understand that it is having some type-conflicts, but I do not know how to make them match the ones defined here in my package - just trying the example found here
"www.oracle.com/technology/docs/

tech/windows/odbc/pdf/odbc_8171_help.pdf ". I'm a newbie and would appreciate any suggestions.

DROP PACKAGE ODBCRefCus;
CREATE PACKAGE ODBCRefCus AS
  TYPE firstname_cus IS REF CURSOR;
  TYPE familyname_cus IS REF CURSOR;
  TYPE address_cus IS REF CURSOR;
  TYPE telno_cus IS REF CURSOR;

Regards,
Harp Received on Wed Feb 09 2005 - 12:10:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US