C/ODBC numeric Scale Problem

barondensebarondense Member Posts: 5
edited 2005-05-11 in Navision Attain
Hi All,

I have some script that uses ADO 2.8 / C/ODBC to extract data from Attain 3.60 to a flat text file.

Server1 is the Navision Server,
Server2 and Server3 are servers I execute the script on. Both have same language settings, and same C/ODBC version and settings. They both connect to the same data on Server1.

My Problem is that one server does not seem to recognize the numeric data from Navision while the other one does. The numeric fields from Attain are ADO type 129 (adNumeric) with A precision of 18 and a Numeric Scale of 5. This is read correctly from both machines, but the values on one machine are a factor 100000 larger than from the other machine (lower number is correct).

Has anybody (please, please) any input/experience with this behaviour?

Thanks a million!

Bo Andersen

Comments

  • kinekine Member Posts: 12,562
    Can you post info about server2 and server3? (OS version, language settings etc.)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • barondensebarondense Member Posts: 5
    Sure: The 2 servers are both Windows 2003 Servers std edition. Both User and OS are usning Danish as regional settings, but the OS themselves are english versions. As far as I can tell, they are identical in they way they are setup. They both use ADO 2.8 and the same version of C/ODBC.

    I've attempted to cut everything away in my tests, so all I do is to write raw ado.field values to a text file and the results are as described.

    I've also done a direct comparison between the ODBC settings in windows registry and they match.

    My first thought was that it had to be regional settings related, so I reinstalled the odbc driver making sure that the settings were equal on both servers, but thinking further, I do not uderstand the factor 100000. I would assume that the decimal point (comma or period) might be the problem, but that would only give a factor 100 difference. Thus, I investigated the field properties and found that both had Presision 18 and scale 5. The factor 100000 could be explained by the faulty server ignoring the scale property on the field, but that does not seem to be the case

    Thanks
    Bo
Sign In or Register to comment.