cancel
Showing results for 
Search instead for 
Did you mean: 

Where does "iAnywhere driver for Oracle" get it's Culture info/currency ?

Former Member
2,973

Hi,

Situation: We use "iAnywhere for Oracle driver" via ODBC in order to perform mobilink synchronizations. When performing inserts in the database there are triggers that convert decimals in to characters via a TO_CHAR() command (This is just something we need for our business)

The culture/currency this session is using is American => so the decimals that are converted to text look like "2.5" Though, when we manually insert data via a personal IDE and these trigger fire => The tekst looks like "2,5" because in the local culture comma's and dots are used the other way around....Also the Database settings have a local culture in the NLS_Settings.

We currently cannot pinpoint why Mobilink is using the American culture.

Does anyone know where "iAnywhere driver for oracle" gets it's culture from? Is this from the OS or from somewhere else?

Thanks in advance !

Accepted Solutions (1)

Accepted Solutions (1)

jeff_albion
Product and Topic Expert
Product and Topic Expert

This is intentional behaviour - see CR 480434. MobiLink cannot handle data that uses a comma for values - attempting to synchronize values with such a format to a SQL Anywhere or UltraLite database results in an error.

In order to avoid this problem, the "SQL Anywhere - Oracle" ODBC driver will always executes the following option upon connection to Oracle to set the format back to using a period as a decimal separator for its own connections:

ALTER SESSION SET NLS_NUMERIC_CHARACTERS=".,"

In addition to this, the SQL:2011 standard formally defines an exact numeric literal as:

<exact numeric literal> ::= <unsigned integer> [ <period> [ <unsigned integer> ] ] | <period> <unsigned integer>

This is because other SQL statements (e.g. INSERT) use a comma as a value separator, so it can't be used to express decimal points in general.

Former Member

Wow - thanks. I didn't think anywone would be able to answer this question. Good to know ! Thanks for looking this up. This gives us something to rely on. This way we know that this option will Always be checked when using this driver.

Answers (0)