Code: Select all
sql="SELECT * FROM USERS";
try {
stmt=con.prepareStatement(sql);
rs=stmt.executeQuery();
while (rs.next()) {
}
} catch (e) {
// Dump the SQL for debugging purposes
print("An error occurred reading the database when getting the CM cost with the query " + sql);
print(e);
if(rs) rs.close();
if(stmt) stmt.close();
if(con) con.close();
event.stopExecution();
} finally {
if(rs) rs.close();
if(stmt) stmt.close();
}