Hello,
I get a strange error.
I modify my regional settings,
select English(United States) for Standards and Formats,
click on "customize",
on "Numbers" tab change Decimal symbol to "," (comma) and Digit grouping symbol to " " (space),
on "Currency" tab change Decimal symbol to "," (comma) and Digit grouping symbol to "." (period),
apply settings,
start your demo: "Query.exe" and open the query: "select cast(1234/100 as numeric(15,3))"
the result shown to me is 12000.
Thats wrong. With default settings, the correct result 12 is shown.
The error only occurs for numeric columns.
I used last Version 3.55.2.22, I tried Delphi 5 and Delphi 7 (German Version).
Is it an Sdac Error or a Delphi error?
Thanks for your help.
error with non-standard number formatting
error with non-standard number formatting
Hello,
the result in Delphi 7 is: 12,34
in Delphi 5 I am not able to compile it.
the result in Delphi 7 is: 12,34
in Delphi 5 I am not able to compile it.
-
- Posts: 5
- Joined: Tue 22 Nov 2005 07:26
- Location: Germany
Hello,
Please notice that the error only occurs with exact these regional settings English(United States):
on "Numbers" tab change Decimal symbol to "," (comma) and Digit grouping symbol to " " (space), and
on "Currency" tab change Decimal symbol to "," (comma) and Digit grouping symbol to "." (period).
A query with default ADO components result in 12 (ok).
The same query with Sdac components result in 12000 (!).
Please notice that the error only occurs with exact these regional settings English(United States):
on "Numbers" tab change Decimal symbol to "," (comma) and Digit grouping symbol to " " (space), and
on "Currency" tab change Decimal symbol to "," (comma) and Digit grouping symbol to "." (period).
A query with default ADO components result in 12 (ok).
The same query with Sdac components result in 12000 (!).
If Field DataType property is ftFloat and regional settings modified as you said, the Microsoft OLEDB Provider for MS SQL Server returns incorrect field value. To avoid this problem you can set EnableBCD property to True. ADO components fetchs this value as decimal but not as float. That's why you get correct value using ADO.
-
- Posts: 5
- Joined: Tue 22 Nov 2005 07:26
- Location: Germany