public void connectData() {
		switch (selectResult) {
		case 1: // 表示连接的是mysql

			url = DriverString.MYSQL_JDBC + hostName + ":" + port + "/";
			ConnectDB.url = url;
			ConnectDB.user = name;
			ConnectDB.password = password;
			if(dataField.getItemCount() != 0){
				dataField.removeAllItems();
			}
			dataField.addItem(StringConstants.SELECT_DATABASE);
			try {
				DatabaseMetaData databaseMeta = (DatabaseMetaData)ConnectDB.getConn().getMetaData();
				ResultSet resultSet = databaseMeta.getCatalogs();
				String dataName = "";
				while(resultSet.next()){
					dataName = resultSet.getString("TABLE_CAT");
					dataField.addItem(dataName);
				}
				dataField.setEnabled(true);
				openConnectBtn.setEnabled(true);
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				Toolkit.getDefaultToolkit().beep();
				JOptionPane.showMessageDialog(connectDialog, e.getMessage(), "连接数据库出错", JOptionPane.ERROR_MESSAGE);
				//e.printStackTrace();
			} catch (ClassNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}finally{
				ConnectDB.closeConn();
			}
		
			break;
		case 2://连接oracl
			dataName = dataField2.getText().trim();
			url = DriverString.ORACLE_JDBC + hostName + ":" + port + ":"
					+ dataName;
		default:
			break;
		}
	}