Skip to Content.
Sympa Menu

freetds - RE: [freetds] Problem with data type conversions andFreeTDScontinued...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Problem with data type conversions andFreeTDScontinued...
  • Date: Fri, 1 Aug 2003 14:15:04 +0200

>
> >
> > OK, here goes. Warning - quite a nasty lot of data. I can't
> > see anything
> > obvious as to why the conversion isn't happening...
> >
>
> 2003-08-01 09:43:57.896956 tds7_get_data_info:1083: 19
> type = 98 (variant)
> column_varint_size = 4
> colname = _sql_variant
> colnamelen = 12
>
> Perhaps this is the problem. FreeTDS still do not support VARIANT
> type....
>

Try also this small patch

diff -u -1 -0 -b -r1.202 token.c
--- src/tds/token.c 13 Jul 2003 16:06:02 -0000 1.202
+++ src/tds/token.c 1 Aug 2003 12:13:31 -0000
@@ -1649,21 +1649,28 @@
static int
tds_get_data(TDSSOCKET * tds, TDSCOLINFO * curcol, unsigned char
*current_row, int i)
{
unsigned char *dest;
int len, colsize;
int fillchar;
TDSBLOBINFO *blob_info;

tdsdump_log(TDS_DBG_INFO1, "%L processing row. column is %d
varint size = %d\n", i, curcol->column_varint_size);
switch (curcol->column_varint_size) {
- case 4: /* Its a BLOB... */
+ case 4:
+ if (curcol->column_type == SYBVARIANT) {
+ colsize = tds_get_int(tds);
+ tds_get_n(tds, NULL, colsize);
+ tds_set_null(current_row, i);
+ return TDS_SUCCEED;
+ }
+ /* Its a BLOB... */
len = tds_get_byte(tds);
blob_info = (TDSBLOBINFO *) &
(current_row[curcol->column_offset]);
if (len == 16) { /* Jeff's hack */
tds_get_n(tds, blob_info->textptr, 16);
tds_get_n(tds, blob_info->timestamp, 8);
colsize = tds_get_int(tds);
} else {
colsize = 0;
}
break;

(it discard variant data putting a NULL)

freddy77



  • RE: [freetds] Problem with data type conversions andFreeTDScontinued..., ZIGLIO Frediano, 08/01/2003

Archive powered by MHonArc 2.6.24.

Top of Page