`

rcp开发遇到的问题解决方法

阅读更多

1 、 先关闭Statement对象,再关闭ResutlSet对象

 try {//最后关闭ResutltSet,Statement.并释放连接
    if (rs != null)
         rs.close();    //ResultSet对象已关闭
    if (rs.getStatement() != null)    //无法调用其方法,抛错
         rs.getStatement().close();  
    DbManager.releaseConnection();
} catch (SQLException e) {
        e.printStackTrace();
}

java.sql.SQLException: Operation not allowed on closed ResultSet. Statements can be retained over result set closure by setting the connection property "retainStatementAfterResultSetClose" to "true".

不允许对已关闭的ResultSet进行操作。只有设置连接属性retainStatementAfterResultSetClose的值为"true",才可在结果集关闭的情况下保留Statements。

2、把包拷贝到项目下面,然后在plugin.xml的runtime中的Classpath中加入你的包.其他动作就不用做了.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics