K
kikiyang
Unregistered / Unconfirmed
GUEST, unregistred user!
我在java里(jdk1.2.2,运行于resin1.3)调用oracle的一个存储过程PROCEDURE PRO_GENSHEETNO_TS(i_sheetype in varchar,o_sheetno out varchar),代码如下ublic void execProc()//调用含参数的存储过程
{
try{
cs=conn.prepareCall("{call PRO_GENSHEETNO_TS (i_sheettype,o_sheetno)}");
cs.registerOutParameter(2, Types.VARCHAR);
cs.setString(1,"APPSHEET");
String res = cs.getString(2);
System.out.print(res);
}
catch (Exception e) {
// e.printStackTrace();
System.out.println(e.toString());
}可是为什么总是报错"无效的列索引'呢?请各位告诉我啊....别告诉我用sqlj啊...
{
try{
cs=conn.prepareCall("{call PRO_GENSHEETNO_TS (i_sheettype,o_sheetno)}");
cs.registerOutParameter(2, Types.VARCHAR);
cs.setString(1,"APPSHEET");
String res = cs.getString(2);
System.out.print(res);
}
catch (Exception e) {
// e.printStackTrace();
System.out.println(e.toString());
}可是为什么总是报错"无效的列索引'呢?请各位告诉我啊....别告诉我用sqlj啊...