我里面有一些 OAF 代码,我正在启动 sql 连接,但是当我试图关闭它时,它会引发 sql 异常。这是代码。
try
{
conn =
(OracleConnection)oadbtransactionimpl.getJdbcConnection();
String queryForEmpty =
"select ... query here";
projectDetailsStatment =
conn.prepareStatement(queryForEmpty);
projectDetailsStatment.setString(1,sprojectid);
ResultSet rs = projectDetailsStatment.executeQuery();
}
catch(SQLException e)
{
String sqlErrMsg = e.getMessage();
throw new OAException((new StringBuilder()).append("handle exception here:").append(sqlErrMsg).toString(), (byte)0);
}
finally
{
conn.close(); // throws exception here
}