Code example for Connection

Methods: createStatement, setAutoCommit

0
			MySQLURL = "jdbc:mysql://" + MySQLHost + ":" + MySQLPort + "/"
					+ MySQLDataBase;
			Class.forName("com.mysql.jdbc.Driver");
			MySQLConnection = DriverManager.getConnection(MySQLURL, MySQLUser,
					MySQLPass);
			MySQLStatement = MySQLConnection.createStatement();
			MySQLConnection.setAutoCommit(true);
		} catch (Exception e) {
			plugin.consoleWarning("MySQL connection failed: " + e.toString());
		} finally { 
		} 
	} 
 
	public Connection getConnection() {
		return MySQLConnection;
	} 
 
	public Statement getStatement() {
		return MySQLStatement;
	}