日期:2014-05-20 浏览次数:20734 次
public int getLastMemberID() {
int ID=0;
String queryStr = "SELECT * FROM " + tableName;
try{
stmt = conn.prepareStatement(queryStr);
ResultSet rs = stmt.executeQuery();
while(rs.last()){
ID=rs.getInt("MEMBERID");
}
}catch(SQLException ex){
JOptionPane.showMessageDialog(null, ex.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE);
}
return ID;
}