萬盛學電腦網

 萬盛學電腦網 >> 數據庫 >> oracle教程 >> jsp調用oracle的存儲過程

jsp調用oracle的存儲過程

假定存儲過程名字為 sp_yourprocedurename,有兩個參數

CallableStatement cstmt = con.prepareCall("{call sp_yourprocedurename(?,?}");
cstmt.registerOutparameter(2,java.sql.Types.FLOAT);
cstmt.setint(1,parameter1);
cstmt.execute();
out.println("Procedure output is :"+cstmt.getFloat(2));

copyright © 萬盛學電腦網 all rights reserved