Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Decimal separator with connection over Ole DB

442969Apr 28 2005 — edited Jun 2 2005
Hello,
I tries to describe the problem (and sorry for my english). Our application can access the Oracle over OCI or over Oracle Ole DB provider.
The Registry key under HKEY_LOCAL_MACHINE\...\KEY_OraDb10g_home1: NLS_LANG has the value “GERMAN_GERMANY.WE8MSWIN1252“.

Nevertheless a simple command: “select 1/4from dual“ over Oracle Ole DB supplies the following result: “.25”!

We found out that with the access over Ole DB the following command:
select * from NLS_SESSION_PARAMETERS
supplies the following results:

PARAMETER VALUE
NLS_LANGUAGE GERMAN
NLS_TERRITORY GERMANY
NLS_CURRENCY €
NLS_ISO_CURRENCY GERMANY
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT YYYY-MM-DD HH24:MI:SS
NLS_DATE_LANGUAGE GERMAN
NLS_SORT GERMAN
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD.MM.RR HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT DD.MM.RR HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY €
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE

It is notably that values of 2 parameters (NLS_NUMERIC_CHARACTERS und NLS_DATE_FORMAT) differ from the values, which are selected over OCI:

PARAMETER VALUE
NLS_NUMERIC_CHARACTERS ,.
NLS_DATE_FORMAT DD.MM.RR

That enough are already strangely. But it continues however. We inserted the following: directly after the Connect the variable NLS_NUMERIC_CHARACTERS is changed:
ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ',.'.
Now the command “select 1/4from dual“ supplies correctly formatted result: “,25”.
BUT NOT ON MY COMPUTER!
If the program runs on my computer, “.25” is still returned!

Does someone have an idea, what can be the reason for it? What else affects formatting here? I repeat: it happens only with connection over Oracle Ole DB provider!
And on the Client all land settings (and numeric settings) in Windows are correctly set for Germany.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2005
Added on Apr 28 2005
2 comments
5,362 views