Skip to Content.
Sympa Menu

freetds - RE: money wire format

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Bill Thompson" <thompbil AT exchange.uk.ml.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: RE: money wire format
  • Date: Thu, 8 Aug 2002 10:08:03 -0400


Hey James,

> As my father used to say, we're cooking with gas.
>
> I basically stole the pre-August 2 code and adpated it to tds_convert_money.
> Once I understood the problem and realized we had had working code at one
> time, it was just a matter of fitting the old logic into your new signature.
> I spent more time researching the problem than fixing it.
>
> The clue was that both you and Brian said TDS_MONEY is two 32-bit integers
> (not one 64-bit one).
>
> I left your code in place (#ifdef'ed out) in case you want to endianize your
> version instead, or in case mine is good for one situation and yours for
> another. Let me know if you want to fix it; otherwise and some point I'll
> remove it.
>

Hmmm. As I remember, the reasons I embarked on the money sidetrack were
twofold:

1) there weren't enough money entries in the conversion matrix

2) I'm pretty sure in my testing that the existing conversion function
(money to string) worked OK for smallish amounts, but didn't work for
large amounts.
When I tried to understand what was going wrong, I found the code was
beyond my understanding, so I tried to change tack completely.

It could be that the money errors I found were not inherently to do with
the conversion code, but something else entirely. perhaps you could check
it out ?

> What do you see as still TODO for 0.60?
>

Brian I think still has to put in the error handling into convert.c.
there's a placeholder for error messages (find "error_handler" in the
code). I had more idle thoughts about this, though....what do you think of
a callback function as a parameter to tds_convert()? Just an idea.
I'm pretty happy otherwise. You could put in a standard comment header at
the top of freebcp.c for me, though.

> Regards,
>
> --jkl
>

Best Wishes. I'm off on holiday now until 26th August! Going to Cannes
(South of France) for 2 weeks. I hope all goes well with you in the
meantime.


Bill




Archive powered by MHonArc 2.6.24.

Top of Page