Skip to Content.
Sympa Menu

freetds - long long money matters

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: James K. Lowden <jklowden AT speakeasy.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: long long money matters
  • Date: Sun, 4 Aug 2002 20:20:52 -0400


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




Archive powered by MHonArc 2.6.24.

Top of Page