Problem: Regional Settings and decimal separator
Posted: Thu 03 Apr 2008 12:01
Problem:
Numeric data stored in a MSSQL database is displayed incorrect on the client.
Description:
We use a database installed on a MS SQL-Server 2005 SP2 with collation sequence SQL_LATIN1_GENERAL_CP850_CI_AI.
The problem can be reproduced with the following example:
Server:
English (USA)
Client:
English (USA)
Decimal Separator: , (comma)
Thousand Separator: . (point)
While the data is stored as 50 in the database it is displayed as
as 500000000 on the client.
After some research we tracked down the error to be part of the dbxsda driver. We currently use version 3.10.6.0 of dbexpsda.dll but the problem also occurs with the latest version of the driver. The problem dont appear if we use the dbExpress driver shipped with Delphi 7 but we cant use this driver because it contains some other bugs.
Numeric data stored in a MSSQL database is displayed incorrect on the client.
Description:
We use a database installed on a MS SQL-Server 2005 SP2 with collation sequence SQL_LATIN1_GENERAL_CP850_CI_AI.
The problem can be reproduced with the following example:
The server and the client are using different regional settings which is a requirement from our client.CREATE TABLE TestTable
TestID int IDENTITY (1, 1) NOT NULL ,
DesiredValue PROZENT NOT NULL
INSERT TestTable VALUES (50)
Server:
English (USA)
Client:
English (USA)
Decimal Separator: , (comma)
Thousand Separator: . (point)
While the data is stored as 50 in the database it is displayed as
as 500000000 on the client.
After some research we tracked down the error to be part of the dbxsda driver. We currently use version 3.10.6.0 of dbexpsda.dll but the problem also occurs with the latest version of the driver. The problem dont appear if we use the dbExpress driver shipped with Delphi 7 but we cant use this driver because it contains some other bugs.