Smallmoney and money rounded to 2 decimals?
Sebastien FLAESCH <[email protected]> Fri, 6 Apr 2018 13:59:43 +0200
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Organization | Four Js Development Tools |
| Message-ID | <[email protected]> |
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