Skip to Content.
Sympa Menu

freetds - About patch #580072 (2)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS <freetds AT franklin.oit.unc.edu>
  • Subject: About patch #580072 (2)
  • Date: 16 Aug 2002 13:27:04 +0200


I applied this patch, modified (I use same byte alignment of old
function but removing bugs and improving it).

Note that g__precision_bytes_per_prec problem remain.
I tried to resolve this problem and perhaps I find a solution.
I token.c we always swap bytes coming from TDS7/8 (MSSQL do not return
numeric on TDS4.2 but convert to float, I test this on MSSQL7).
So freetds library use always Sybase coding in TDS_NUMERIC.
So we not leave g__precision_bytes_per_prec values fixed to Sybase db?
I tested and work very good. Who made the change to
g__precision_bytes_per_prec (I node in old numeric.c comment that time
ago this structure was const)

Note also that ODBC require little-endian alignment while Sybase (and
FreeTDS) use big-endian, so conversion in ODBC to SQLNUMERIC should swap
bytes.

freddy77





  • About patch #580072 (2), Frediano Ziglio, 08/16/2002

Archive powered by MHonArc 2.6.24.

Top of Page