Skip to Content.
Sympa Menu

freetds - [freetds] Smallmoney and money rounded to 2 decimals?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Sebastien FLAESCH <sf AT 4js.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Smallmoney and money rounded to 2 decimals?
  • Date: Fri, 6 Apr 2018 13:59:43 +0200

Hi all,

Using FreeTDS 1.00.9:

When fetching a smallmoney or money data, SQLDescribeCol() returns
the sqltype SQL_DECIMAL, precision 10 for smallmoney and or 19 for
money and a scale of 4 for both types, which is fine, since smallmoney
and money can store 4 decimal digits.

Using an SQL_C_CHAR buffer to hold the values, we see that the decimal
part is rounded to 2 digits...

Is this expected?

using other ODBC drivers for SQL Server we get 4 decimal digits.

Is there some configuration settings to control this?

Thanks!
Seb




Archive powered by MHonArc 2.6.24.

Top of Page