....
Connection ,ResultSet , Statement
這三個(gè)每次使用之后你都不進(jìn)行關(guān)閉么?
謝謝 馬嘉楠 的批評(píng)。
但是調(diào)用程序里是這樣寫(xiě)的:
DBConnection db = DBConnection.getInstance();
String strTitle = "";
try {
ResultSet rs = db.executeQuery("select name from TB_PAGEFRAME where type = '1'");
while(rs.next()){
strTitle = rs.getString("name");
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
db.close();
}