use result.close
and connection.close()
and connection.close()
解决方案 »
- 求命令行的文件编码utf8/ascii等转换器
- 不显示删除回复显示所有回复显示星级回复显示得分回复 请教各位大侠:swing中的怎样将一个主页面的消息传送到子页面中
- 求助考试题目关于垃圾收集的
- 一个线程题????
- 我想把LIST1(SRING [])里的的数据全部追加到LIST2(STRING [])里。
- 怎么显示
- 一个怪问题,包的引用
- 有没有完整的身份验证的代码!200分!我要交作业的!11111111
- =======怎么把一个String变成一个int []数组????
- 一个很简单的关于异常问题,请指点!!
- 关于瓢的问题"Could not find the main clas .Program will exit!"(我给高分)
- 救命呀!关于visualage安装的问题
and connection.close()然后再使用
Statement stmt=conn.createStatement();
String sql = "Select ... From ... Where ...";
ResultSet rs = stmt.executeQuery(sql);
if( !rs.next() )
{
rs.close();
stmt.close();
conn.close();
}
String str... = rs.getString("...");
...
rs.close();
stmt.close();
conn.close();
//在此就不能用rs,stmt,conn等对象了除非你再重新open