Guest User

Untitled

a guest
Oct 31st, 2017
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Connection conn = null;
  2. String userName = "root";
  3. String password = "rnd";
  4. java.sql.Statement s;
  5. java.sql.ResultSet rs;
  6. try {
  7. DBConnector db = new DBConnector("FEED_ZINGME",userName, password);
  8. String q = "DROP DATABASE IF EXISTS FEED_ZINGME_"+cDate;
  9. db.update(q);
  10. } catch (Exception e) {
  11. System.err.println("Cannot connect to database server");
  12. System.out.println(e);
  13. } finally {
  14. if (conn != null) {
  15. try {
  16. conn.close();
  17. System.out.println("Database connection terminated");
  18. } catch (Exception e) { /* ignore close errors */ }
  19. }
  20. }
Add Comment
Please, Sign In to add comment