<%
String no1=request.getParameter("no1");
String no2=request.getParameter("no2");
int no3=Integer.parseInt(request.getParameter("no3"));
CallableStatement smt=null;
String strSQL="";Connection con=dblink.connection();
strSQL ="{call vote02.PROC_FAKE_359(?,?,?)}";
smt=con.prepareCall(strSQL);//设置输入参数
smt.setString(1,no1);
smt.setString(2,no2);
smt.setInt(3,no3);
smt.registerOutParameter(4,oracle.jdbc.OracleTypes.INTEGER);//登记输出参数
try{
boolean flag = smt.execute(strSQL);
}catch(Exception e){out.print("err:"+e.toString());}
存储过程是可以运行的。但用jsp调用后报错:ORA-01008: not all variables bound
String no1=request.getParameter("no1");
String no2=request.getParameter("no2");
int no3=Integer.parseInt(request.getParameter("no3"));
CallableStatement smt=null;
String strSQL="";Connection con=dblink.connection();
strSQL ="{call vote02.PROC_FAKE_359(?,?,?)}";
smt=con.prepareCall(strSQL);//设置输入参数
smt.setString(1,no1);
smt.setString(2,no2);
smt.setInt(3,no3);
smt.registerOutParameter(4,oracle.jdbc.OracleTypes.INTEGER);//登记输出参数
try{
boolean flag = smt.execute(strSQL);
}catch(Exception e){out.print("err:"+e.toString());}
存储过程是可以运行的。但用jsp调用后报错:ORA-01008: not all variables bound
参数列表如下:
p_strPhone String类型,入参,
p_strContent String类型,入参,
p_nAddValue Number类型,入参,
p_nError Number类型,出参.
因为ORACLE存储过程会有返回值的???
========================================================
返回的是任务号吧