Skip to Content.
Sympa Menu

freetds - Re: Nonfunctional datatype: UNIQUEIDENTIFIER

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Nonfunctional datatype: UNIQUEIDENTIFIER
  • Date: 04 Sep 2002 08:27:32 +0200


Il mar, 2002-09-03 alle 22:00, Eric Deutsch ha scritto:
>
> Hi, I inherited a table from someone else that has the datatype
> UNIQUEIDENTIFIER, which is supported by MSSQL 2000 at least. This is a
> GUID type thingy. It is a 16-byte value typically displayed in 32 hex
> digits like:
>
> 9E79F6C1-8327-11D0-A9CE-02608C8F74F1
>
> When I do a query against such a column (using DBD::Sybase), I get:
>

Well, problem is not FreeTDS but DBD::Sybase. Simply it do not expect
this type...

Uncompress source, edit C file replacing

case CS_NUMERIC_TYPE:
case CS_DECIMAL_TYPE:
len = (CS_MAX_PREC + 2);
break;

default:
len = column->maxlength;
break;

with

case CS_NUMERIC_TYPE:
case CS_DECIMAL_TYPE:
len = (CS_MAX_PREC + 2);
break;

#ifdef CS_UNIQUE_TYPE
case CS_UNIQUE_TYPE:
len = 40;
break;
#endif

default:
len = column->maxlength;
break;

Should work...

> [QUERY]: SELECT TOP 5 ConditionsID,s_GUID FROM accesstemp.dbo.[Human PCR
> Conditions]
> error_handler: Data-conversion resulted in overflow.
> =-2104898907|šÂ@=
> error_handler: Data-conversion resulted in overflow.
> =-2102394566|šÂ@=
> error_handler: Data-conversion resulted in overflow.
> =-2098241821|šÂ@=
> error_handler: Data-conversion resulted in overflow.
> =-2097918306|šÂ@=
> error_handler: Data-conversion resulted in overflow.
> =-2094131412|šÂ@=
>
> The first column is correct, but the second appears to be garbled junk. In
> one test, I got the program to dump a 1 GB core, but that doesn't always
> happen.
>
> Any ideas on how to fix this?
>
> Thanks,
> Eric
>
freddy77






Archive powered by MHonArc 2.6.24.

Top of Page