Skip to content

Commit 4d60f18

Browse files
committed
Add DB col type 98 for int for LOGINPROPERTY function.
1 parent 86c5a0e commit 4d60f18

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ext/tiny_tds/result.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ static VALUE rb_tinytds_result_fetch_row(VALUE self, ID timezone, int symbolize_
216216
val = INT2NUM(*(DBINT *)data);
217217
break;
218218
case SYBINT8:
219+
case 98: // https://git.io/v1ItA
219220
val = LL2NUM(*(DBBIGINT *)data);
220221
break;
221222
case SYBBIT:

test/result_test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,11 @@ class ResultTest < TinyTds::TestCase
335335
assert_nil result.return_code
336336
end
337337

338+
it 'with LOGINPROPERTY function' do
339+
v = @client.execute("SELECT LOGINPROPERTY('sa', 'IsLocked') as v").first['v']
340+
v.must_equal 0
341+
end
342+
338343
describe 'with multiple result sets' do
339344

340345
before do

0 commit comments

Comments
 (0)