Hi,
I use Delphi 2006, ECOIII and BDP to connect to an Oracle 10g Database.
I have a problem retrieving decimal values from the database when I change the DecimalSeparator and ThousandSeparator in Windows.
In the eco model all types for decimal values are declared as type double, in the database all the value fields are number fields.
NLS settings for the database - NLS_NUMERIC_CHARACTERS; ,.
When the DecimalSeparator is set to , all values are retrieved correctly, but when changed to . all values are multiplied by 10, for ex.: 6,2 becomes 62
I tried to override this behavior by adding an Initialization string to the bdp connection string
this.bdpConnection1.ConnectionString = "assembly=Borland.Data.Oracle, Version=2.5.0.0,
Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b;vendorclient=oci.dll;pooling=True;
grow on demand=True;database="+_DBPath_Main+";username="+_userName+";
max pool size=100;password="+_passWord+";provider=Oracle;min pool size=0;
Initialization String=alter session set NLS_NUMERIC_CHARACTERS = ',.'";
but that had no effect.
Do you have any ideas or suggestions how to overcome this behavior?
The next thing I would try to do is to add the sql statement alter session set NLS_NUMERIC_CHARACTERS in an extra query at program start and not in the connection string, maybe this will help.
Or can I add something like a persistenceMapper for all decimal values retrieved from the database where I convert the values according to the DecimalSeparator settings in Windows?
Thanks for your help in advance.