diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java index 20cb35c99..51de4f44e 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java @@ -1484,7 +1484,9 @@ Connection connectInternal(Properties propsIn, if (sPropValue == null) sPropValue = SQLServerDriverStringProperty.SELECT_METHOD.getDefaultValue(); if ("cursor".equalsIgnoreCase(sPropValue) || "direct".equalsIgnoreCase(sPropValue)) { - activeConnectionProperties.setProperty(sPropKey, sPropValue.toLowerCase(Locale.ENGLISH)); + sPropValue = sPropValue.toLowerCase(Locale.ENGLISH); + activeConnectionProperties.setProperty(sPropKey, sPropValue); + selectMethod = sPropValue; } else { MessageFormat form = new MessageFormat(SQLServerException.getErrString("R_invalidselectMethod")); Object[] msgArgs = {sPropValue}; @@ -1755,13 +1757,6 @@ else if (0 == requestedPacketSize) sPropKey = SQLServerDriverBooleanProperty.XOPEN_STATES.toString(); xopenStates = booleanPropertyOn(sPropKey, activeConnectionProperties.getProperty(sPropKey)); - sPropKey = SQLServerDriverStringProperty.SELECT_METHOD.toString(); - selectMethod = null; - if (activeConnectionProperties.getProperty(sPropKey) != null - && activeConnectionProperties.getProperty(sPropKey).length() > 0) { - selectMethod = activeConnectionProperties.getProperty(sPropKey); - } - sPropKey = SQLServerDriverStringProperty.RESPONSE_BUFFERING.toString(); responseBuffering = null; if (activeConnectionProperties.getProperty(sPropKey) != null