R
rockchina
Unregistered / Unconfirmed
GUEST, unregistred user!
帮我看看下面的用java调用存储过程的代码错在哪里
Connection conn = null;
//String sql = "execute "+procedureName + "('"+parameter+"','"+productID+"')";
try {
/* 取一个数据库连接 */
conn = Transaction.getConnection();
/* 创建执行SQL */
DatabaseMetaData dmd = conn.getMetaData();
CallableStatement stmt = conn.prepareCall("{call RSaddConsignCostByProd(?, ?)}");
stmt.setString(1,date);
stmt.setString(2,productID);
int res = stmt.executeUpdate();
System.out.println(res);
stmt.close();
Connection conn = null;
//String sql = "execute "+procedureName + "('"+parameter+"','"+productID+"')";
try {
/* 取一个数据库连接 */
conn = Transaction.getConnection();
/* 创建执行SQL */
DatabaseMetaData dmd = conn.getMetaData();
CallableStatement stmt = conn.prepareCall("{call RSaddConsignCostByProd(?, ?)}");
stmt.setString(1,date);
stmt.setString(2,productID);
int res = stmt.executeUpdate();
System.out.println(res);
stmt.close();