diff --git a/lib/active_record/connection_adapters/sqlserver/jdbc_overrides.rb b/lib/active_record/connection_adapters/sqlserver/jdbc_overrides.rb index 8ce9b9558..4444dc724 100644 --- a/lib/active_record/connection_adapters/sqlserver/jdbc_overrides.rb +++ b/lib/active_record/connection_adapters/sqlserver/jdbc_overrides.rb @@ -99,6 +99,7 @@ def supports_transaction_isolation? # Called to set any connection specific settings that aren't defined ahead of time def configure_connection + return unless @connection.connection.respond_to? :setSendTimeAsDatetime # For sql server 2008+ we want it to send an actual time otherwise comparisons with time columns don't work @connection.connection.setSendTimeAsDatetime(false) end