Skip to Content.
Sympa Menu

freetds - Re: long long money matters

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.metalab.unc.edu>
  • Subject: Re: long long money matters
  • Date: Sun, 4 Aug 2002 21:12:43 -0400 (EDT)


Actually Jim,

I think that is a good reference point for what we do if there is no long
long __int64 (or whatever) or who knows what. The old code at least
handled money -> char using the numeric code. I think that's 90% of what
we do, money to anything else is mostly a corner case for most purposes.
It would be nice to provide that fallback at least. SYBINT8 can be a
modern platform only thing, but money's been around a long time.

Brian

On Sun, 4 Aug 2002, James K. Lowden wrote:

> Bill,
>
> To try out big money (as it were), I updated my FreeTDS cvs tree on my
> i386 Linux Sybase server, rebuilt it and sqsh. Running there, I
> encountered the same data problem, except that no error messages are
> produced:
>
> [8] sandbox.master.1> select convert(smallmoney,8), convert(money,8)
> [8] sandbox.master.2> go
>
> ---------- ---------------------
> 8.00 34359738368.0000
>
> So, we're having trouble getting from money to char. Contrary to my
> previous message, as you can see, smallmoney works fine.
>
> The problems on my old NetBSD test machine, which lacks any form of 64-bit
> int, would seem to be related to many (reasonable) assumptions about the
> size of TDS_INT8. I'll have to modernize things a bit before I can be
> more use.
>
> You may want to try:
> http://home.schemamania.org/freetds/cvs/freetds/src/dblib/unittests/convert_acid.c
>
> Invoke as "echo 'query' | convert_acid -U sa -P -S servername # or
> whatever
>
> It prints out its attempts to convert each column in turn to every other
> datatype. The coverage of tds_willconvert is still incomplete, but
> convert_acid.c can still uncover things, at this stage at least.
>
> Thanks for the fine work. Hope this helps.
>
> Regards,
>
> --jkl
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>




  • long long money matters, James K . Lowden, 08/04/2002
    • <Possible follow-up(s)>
    • Re: long long money matters, Brian Bruns, 08/04/2002

Archive powered by MHonArc 2.6.24.

Top of Page