Here you can find the source of callPro2(String sql, String[] inparameters, Integer[] outparameters)
public static CallableStatement callPro2(String sql, String[] inparameters, Integer[] outparameters)
//package com.java2s; //License from project: Apache License import java.sql.*; public class Main { private static Connection ct = null; private static String url = ""; private static String username = ""; private static String passwd = ""; private static CallableStatement cs = null; public static CallableStatement callPro2(String sql, String[] inparameters, Integer[] outparameters) { try {/* w ww .j a v a 2s . c om*/ ct = getConnection(); cs = ct.prepareCall(sql); if (inparameters != null) { for (int i = 0; i < inparameters.length; i++) { cs.setObject(i + 1, inparameters[i]); } } //cs.registerOutparameter(2,oracle.jdbc.OracleTypes.CURSOR); if (outparameters != null) { for (int i = 0; i < outparameters.length; i++) { cs.registerOutParameter(inparameters.length + 1 + i, outparameters[i]); } } cs.execute(); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e.getMessage()); } finally { } return cs; } public static Connection getConnection() { try { ct = DriverManager.getConnection(url, username, passwd); } catch (Exception e) { e.printStackTrace(); } return ct; } }