File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
lib/active_record/connection_adapters/sqlserver Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ environment:
34
34
CI_AZURE_PASS :
35
35
secure : cSQp8sk4urJYvq0utpsK+r7J+snJ2wpcdp8RdXJfB+w=
36
36
matrix :
37
+ # - ruby_version: "25" # Fails because of "File does not exist: tiny_tds/tiny_tds" error (See https://github.com/rails-sqlserver/tiny_tds/issues/391).
37
38
- ruby_version : " 25-x64"
38
- - ruby_version : " 25 "
39
+ # - ruby_version: "26" # Fails because of "File does not exist: tiny_tds/tiny_tds" error (See https://github.com/rails-sqlserver/tiny_tds/issues/391).
39
40
- ruby_version : " 26-x64"
40
- - ruby_version : " 26"
41
- - ruby_version : " 27-x64"
42
- - ruby_version : " 27"
41
+ # - ruby_version: "27" # Ruby version not installed on AppVeyor Windows instance.
42
+ # - ruby_version: "27-x64" # Ruby version not installed on AppVeyor Windows instance.
Original file line number Diff line number Diff line change @@ -351,7 +351,10 @@ def raw_connection_do(sql)
351
351
case @connection_options [ :mode ]
352
352
when :dblib
353
353
result = @connection . execute ( sql )
354
- raise ActiveRecordError , 'Database connection has failed' if result == false
354
+ # If connection fails then TinyTDS returns false instead of an exception (see https://github.com/rails-sqlserver/tiny_tds/issues/464)
355
+ if result == false
356
+ raise TinyTds ::Error , 'TinyTDS execute returned false instead of results'
357
+ end
355
358
result . do
356
359
end
357
360
ensure
You can’t perform that action at this time.
0 commit comments