public void refresh(boolean now) throws InterruptedException, InvocationTargetException {
		Runnable runnable = new Runnable() {
			public void run() {
				try {
					int selectedRow = SqlTable.this.getSelectedRow();
					int selectedColumn = SqlTable.this.getSelectedColumn();
					Statement statement = SybaseBuddyApplication.connection.createStatement();
					ResultSet result = statement.executeQuery(sql);
					ResultSetMetaData metaData = result.getMetaData();
					int columnCount = metaData.getColumnCount();
					if (tableModel.getColumnCount() != columnCount) {
						tableModel.setColumnCount(columnCount);
					}
					tableModel.setRowCount(0);
					for (int i = 0; i < columnCount; i++) {
						String columnLabel = metaData.getColumnLabel(i + 1);
						if (!columnLabel.equals(tableModel.getColumnName(i))) {
							tableModel.setColumnName(i, columnLabel);
						}
						if (metaData.getColumnType(i + 1) == 4) {
							// int
							tableModel.setColumnClass(i, Integer.class);
						} else {
							tableModel.setColumnClass(i, tableModel.getColumnClass(i));
						}
					}
					while (result.next()) {
						Vector<Object> rowData = new Vector<Object>();
						for (int i = 0; i < columnCount; i++) {
							Object value = result.getObject(i + 1);
							rowData.add(value);
						}
						tableModel.addRow(rowData);
					}
					tableModel.fireTableDataChanged();
					SqlTable.this.changeSelection(selectedRow, selectedColumn, false, false);
				} catch (Exception e) {
					e.printStackTrace();
					SybaseBuddyApplication.handleException(e);
				}
			}
		};
		if (now) {
			runnable.run();
		} else {
			EventQueue.invokeLater(runnable);
		}
	}