We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ddca72 commit 6861763Copy full SHA for 6861763
lib/active_record/connection_adapters/sqlserver/database_statements.rb
@@ -464,7 +464,7 @@ def finish_statement_handle(handle)
464
end
465
466
def ensure_established_connection!
467
- raise ActiveRecord::ConnectionNotEstablished, 'SQL Server client is not connected' unless @connection
+ raise ActiveRecord::ConnectionNotEstablished, 'SQL Server client is not connected' if @connection.nil? || !@connection.active?
468
469
yield
470
0 commit comments