Skip to content

Commit 8f9fda8

Browse files
committed
Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
1 parent d953a92 commit 8f9fda8

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
* 0.6.1 *
3+
4+
Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
5+
6+
27
* 0.6.0 *
38

49
* Use dbsetversion() vs. dbsetlversion. Fixes #62.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ TinyTDS is developed against FreeTDS 0.82 & 0.91, and 0.92 currents, the latest
3030

3131
* **OK, I am installing FreeTDS, how do I configure it?** Contrary to what most people think, you do not need to specially configure FreeTDS in any way for client libraries like TinyTDS to use it. About the only requirement is that you compile it with libiconv for proper encoding support. FreeTDS must also be compiled with OpenSSL (or the like) to use it with Azure. See the "Using TinyTDS with Azure" section below for more info.
3232

33-
* **Do I need to configure `--with-tdsver` equal to anything?** Maybe! Technically you should not have too. This is only a default for clients/configs that do not specify what TDS version they want to use. We are currently having issues with passing down a TDS version with the login bit. Till we get that fixed, if you are not using a freetds.conf or a TDSVER environment variable, the make sure to use 7.1 for FreeTDS 0.91 and 8.0 for FreeTDS 0.82.
33+
* **Do I need to configure `--with-tdsver` equal to anything?** Most likely! Technically you should not have too. This is only a default for clients/configs that do not specify what TDS version they want to use. We are currently having issues with passing down a TDS version with the login bit. Till we get that fixed, if you are not using a freetds.conf or a TDSVER environment variable, the make sure to use 7.1 for FreeTDS 0.91 and 8.0 for FreeTDS 0.82.
3434

3535
* **But I want to use TDS version 7.2 for SQL Server 2005 and up!** TinyTDS uses TDS version 7.1 (previously named 8.0) and fully supports all the data types supported by FreeTDS, this includes `varchar(max)` and `nvarchar(max)`. Technically compiling and using TDS version 7.2 with FreeTDS is not supported. But this does not mean those data types will not work. I know, it's confusing If you want to learn more, read this thread. http://lists.ibiblio.org/pipermail/freetds/2011q3/027306.html
3636

ext/tiny_tds/client.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ static VALUE rb_tinytds_connect(VALUE self, VALUE opts) {
270270
dbsetlpwd(cwrap->login, StringValuePtr(pass));
271271
if (!NIL_P(app))
272272
dbsetlapp(cwrap->login, StringValuePtr(app));
273+
if (!NIL_P(version))
274+
dbsetlversion(cwrap->login, NUM2INT(version));
273275
if (!NIL_P(ltimeout))
274276
dbsetlogintime(NUM2INT(ltimeout));
275277
if (!NIL_P(timeout))

lib/tiny_tds/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module TinyTds
2-
VERSION = '0.6.0'
2+
VERSION = '0.6.1'
33
end

0 commit comments

Comments
 (0)