Skip to Content.
Sympa Menu

freetds - Re: [freetds] tds_get_size_by_type for SYBMSDATE

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] tds_get_size_by_type for SYBMSDATE
  • Date: Tue, 8 Apr 2014 19:28:04 +0100

2014-04-08 11:08 GMT+01:00 LacaK <lacak AT zoznam.sk>:
> Hi,
> when I look into tds_types.h (which is build on misc/types.csv) there is
> function tds_get_size_by_type() used f.e. by dbconvert()
> And for SYBMSDATE it returns 4 (IMO it is wrong set size=4 in types.csv)
> Is it correct ?
> (as far as I understand it should be size if struct which holds this data
> type i.e.:
> there should be:
> case SYMBSDATE:
> case SYMBSTIME:
> case SYMBSDATETIME2:
> case SYMBSDATETIMEOFFSET:
> return sizeof(TDS_DATETIMEALL);
>
> ?
> When I change it this way, it works as expected for me.
> Thanks
> -Laco.
>


Well... could be... this function is used in a lot of places. As the
fixed column is 0 I don't think should break anything.

What did go wrong before you changed the code?
I'm trying to execute my tests setting that column to sizeof(TDS_DATETIMEALL)

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page