private void doConnect(String username, String password, String url, Properties props) throws CommandException {
		try {
			if (props != null && !props.isEmpty()) {
				if (!props.containsKey("user") && username != null) {
					props.put("user", username);
				}
				if (!props.containsKey("password") && password != null) {
					props.put("password", password);
				}
				this.properties = props;
				this.username = username;
				this.password = password;
				this.url = url;
				conn = DriverManager.getConnection(url, props);
			} else if (username != null || password != null) {
				conn = DriverManager.getConnection(url, username, password);
				this.username = username;
				this.password = password;
				this.url = url;
			} else {
				conn = DriverManager.getConnection(url);
				this.url = url;
			}
		} catch (SQLException e) {
			throw new CommandException("Unable to connect: " + e.getMessage());
		}
	}