Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection mysqlConnection = new Connection("localhost", "root",
- "letmein", 3306, "my_database", new IConnectionInterface()
- {
- @Override
- public void actionCompleted()
- {
- //You are now connected to the database
- }
- @Override
- public void handleInvalidSQLPacketException(InvalidSQLPacketException e)
- {
- //Handle the error
- }
- @Override
- public void handleMySQLException(MySQLException e)
- {
- //Handle the error
- }
- @Override
- public void handleIOException(IOException e)
- {
- //Handle the error
- }
- @Override
- public void handleMySQLConnException(MySQLConnException e)
- {
- //Handle the error
- }
- @Override
- public void handleException(Exception e)
- {
- //Handle the error
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement