public Connection getConnection(JDBCConnectionConfiguration config) throws SQLException { Driver driver = getDriver(config); Properties props = new Properties(); if (stringHasValue(config.getUserId())) { props.setProperty("user", config.getUserId()); //$NON-NLS-1$ } if (stringHasValue(config.getPassword())) { props.setProperty("password", config.getPassword()); //$NON-NLS-1$ } props.putAll(config.getProperties()); Connection conn = driver.connect(config.getConnectionURL(), props); if (conn == null) { throw new SQLException(getString("RuntimeError.7")); //$NON-NLS-1$ } return conn; }
public Connection getConnection(JDBCConnectionConfiguration config) throws SQLException { Driver driver = getDriver(config); Properties props = new Properties(); if (stringHasValue(config.getUserId())) { props.setProperty("user", config.getUserId()); //$NON-NLS-1$ } if (stringHasValue(config.getPassword())) { props.setProperty("password", config.getPassword()); //$NON-NLS-1$ } props.putAll(config.getProperties()); Connection conn = driver.connect(config.getConnectionURL(), props); if (conn == null) { throw new SQLException(getString("RuntimeError.7")); //$NON-NLS-1$ } return conn; }
public Connection getConnection(JDBCConnectionConfiguration config) throws SQLException { Driver driver = getDriver(config); Properties props = new Properties(); if (stringHasValue(config.getUserId())) { props.setProperty("user", config.getUserId()); //$NON-NLS-1$ } if (stringHasValue(config.getPassword())) { props.setProperty("password", config.getPassword()); //$NON-NLS-1$ } if (stringHasValue(config.getRemarksReporting())) { props.setProperty("remarksReporting", config.getRemarksReporting()); //$NON-NLS-1$ } else { props.setProperty("remarksReporting", "true"); //$NON-NLS-1$ } props.putAll(config.getProperties()); Connection conn = driver.connect(config.getConnectionURL(), props); if (conn == null) { throw new SQLException(getString("RuntimeError.7")); //$NON-NLS-1$ } return conn; }