Skip to content

Commit e2ee317

Browse files
committed
Remove old identity cast
was only needed for TDS 5.0 and older.
1 parent cfe7d92 commit e2ee317

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ext/tiny_tds/client.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,7 @@ static VALUE rb_tinytds_connect(VALUE self, VALUE opts) {
433433
}
434434
transposed_encoding = rb_funcall(cTinyTdsClient, intern_transpose_iconv_encoding, 1, charset);
435435
cwrap->encoding = rb_enc_find(StringValueCStr(transposed_encoding));
436-
if (dbtds(cwrap->client) <= 7) {
437-
cwrap->identity_insert_sql = "SELECT CAST(@@IDENTITY AS bigint) AS Ident";
438-
} else {
439-
cwrap->identity_insert_sql = "SELECT CAST(SCOPE_IDENTITY() AS bigint) AS Ident";
440-
}
436+
cwrap->identity_insert_sql = "SELECT CAST(SCOPE_IDENTITY() AS bigint) AS Ident";
441437
}
442438
return self;
443439
}

0 commit comments

Comments
 (0)