Created
October 19, 2010 16:03
-
-
Save ebryn/634458 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/tiny_tds/client.c b/ext/tiny_tds/client.c | |
index 70796b2..aa16c6a 100644 | |
--- a/ext/tiny_tds/client.c | |
+++ b/ext/tiny_tds/client.c | |
@@ -88,7 +88,7 @@ static VALUE allocate(VALUE klass) { | |
static VALUE rb_tinytds_tds_version(VALUE self) { | |
GET_CLIENT_WRAPPER(self); | |
- return INT2FIX(dbtds(cwrap->client)); | |
+ return INT2FIX(8); | |
} | |
static VALUE rb_tinytds_close(VALUE self) { | |
@@ -166,8 +166,8 @@ static VALUE rb_tinytds_connect(VALUE self, VALUE user, VALUE pass, VALUE datase | |
dbsetlpwd(cwrap->login, StringValuePtr(pass)); | |
if (!NIL_P(app)) | |
dbsetlapp(cwrap->login, StringValuePtr(app)); | |
- if (!NIL_P(version)) | |
- dbsetlversion(cwrap->login, NUM2INT(version)); | |
+ // if (!NIL_P(version)) | |
+ // dbsetlversion(cwrap->login, NUM2INT(version)); | |
if (!NIL_P(ltimeout)) | |
dbsetlogintime(NUM2INT(ltimeout)); | |
if (!NIL_P(timeout)) | |
diff --git a/ext/tiny_tds/result.c b/ext/tiny_tds/result.c | |
index 61094d7..06d2d9c 100644 | |
--- a/ext/tiny_tds/result.c | |
+++ b/ext/tiny_tds/result.c | |
@@ -111,12 +111,14 @@ static VALUE rb_tinytds_result_fetch_row(VALUE self, ID timezone, int symbolize_ | |
break; | |
case SYBNUMERIC: | |
case SYBDECIMAL: { | |
- DBTYPEINFO *data_info = dbcoltypeinfo(rwrap->client, col); | |
- int data_slength = (int)data_info->precision + (int)data_info->scale + 1; | |
- char converted_decimal[data_slength]; | |
- dbconvert(rwrap->client, coltype, data, data_len, SYBVARCHAR, (BYTE *)converted_decimal, -1); | |
- val = rb_funcall(cBigDecimal, intern_new, 1, rb_str_new2((char *)converted_decimal)); | |
+ val = Qnil; | |
break; | |
+ // DBTYPEINFO *data_info = dbcoltypeinfo(rwrap->client, col); | |
+ // int data_slength = (int)data_info->precision + (int)data_info->scale + 1; | |
+ // char converted_decimal[data_slength]; | |
+ // dbconvert(rwrap->client, coltype, data, data_len, SYBVARCHAR, (BYTE *)converted_decimal, -1); | |
+ // val = rb_funcall(cBigDecimal, intern_new, 1, rb_str_new2((char *)converted_decimal)); | |
+ // break; | |
} | |
case SYBFLT8: { | |
double col_to_double = *(double *)data; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment