Code example for SQLException

Methods: printStackTrace

0
			conn = DriverManager.getConnection(url, username, password);
			if (!autoCommit)
				conn.setAutoCommit(false);
		} catch (SQLException e) {
			isOpen = false;
			e.printStackTrace();
		} 
		return isOpen;
	} 
 
	public boolean closeConn() { 
		boolean isCommit = true;
		try { 
			conn.commit();
		} catch (SQLException e) {
			isCommit = false;
			e.printStackTrace();
			try { 
				conn.rollback();
			} catch (SQLException e1) {
				e1.printStackTrace();