Skip to Content.
Sympa Menu

freetds - Re: FAQ Alpha src/tds/convert.c SYBDATETIME MSSQL-7.0 fix?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: FAQ Alpha src/tds/convert.c SYBDATETIME MSSQL-7.0 fix?
  • Date: Thu, 10 May 2001 08:38:53 -0400 (EDT)



AFAIK, Alpha is little endian and shouldn't need the fix at all. Possibly
a bitness problem?

Brian

On Thu, 10 May 2001, James Cameron wrote:

> Dates are appearing blank when returned by queries. I saw the FAQ had a
> fix. I've tried this and it did not work for me. They are still blank.
> Has anyone got this working?
>
> Question 3.5 of the FAQ http://www.freetds.org/faq.html#35
>
> "MSSQL-7.0 has a known bug when communicating with big-endian machines.
> Columns of type MONEY and DATETIME are returned as little-endian
> regardless of what was requested. You have to change the ordering of
> high and low words to get correct results.
>
> The following message may be of some guidance:
>
> in src/tds/numeric.c in method tds_money_to_string() added a
> swap(&(money->mnyhigh), &(money->mnylow)) and something similar in
> src/tdsconvert.c in method tds_convert_datetime()."
>
> So I changed
>
> case SYBDATETIME:
> memcpy(dest,src,sizeof(TDS_DATETIME));
>
> to
>
> case SYBDATETIME:
> swab(src,dest,sizeof(TDS_DATETIME));
>
> but dates are still blank. Did I adjust the right section?
>
>
> FreeTDS from CVS two days ago.
> PHP 4.0.5
> Alpha, Compaq Tru64 UNIX
>
>





Archive powered by MHonArc 2.6.24.

Top of Page