我有下一个代码:
public void executeVoid_SP(Connection con, String spName) throws EtiGottaException {
System.out.println(spName);
try {
//cs = con.prepareCall("{ call " + spName + "}");
cs = con.prepareCall("exec dbo." + spName);
cs.execute();
} catch (Exception e) {
throw new EtiGottaException("SqlStoredProcedure: " + e.getMessage());
}
}
问题是当调用方法执行时,应用程序停止执行该方法但是如果我在SQL中执行存储过程,则此过程在几秒钟内执行。任何人都知道,发生了什么?