progress数据库java_(急啊!)java 的sqlite SQL statements in progress是什么原因

atorg.sqlite.DB.throwex(DB.java:288)atorg.sqlite.DB.ensureAutoCommit(DB.java:336)atorg.sqlite.DB.execute(DB.java:264)atorg.sqlite.Stmt.exec(Stmt.java:56)atorg.sqlite.Stmt...

at org.sqlite.DB.throwex(DB.java:288)

at org.sqlite.DB.ensureAutoCommit(DB.java:336)

at org.sqlite.DB.execute(DB.java:264)

at org.sqlite.Stmt.exec(Stmt.java:56)

at org.sqlite.Stmt.executeQuery(Stmt.java:90)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

可是我上面把stmt和rs都close()掉了。

执行删除方法:public int execute(String sql) throws Exception {

int result = -1;

try {

stmt = conn.createStatement();

result = stmt.executeUpdate(sql);// 执行SQL语句把值赋予result

System.out.println(result);

} catch (SQLException e) {

throw e;

}

return result;

}

关闭方法:public int closestmt(){

int i=0;

try {

rs.close();

rs=null;

stmt.close();

stmt=null;

i=1;

} catch (SQLException e) {

e.printStackTrace();

i=0;

}

return i;

}

展开

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值