Обсуждение: ODBC problem with decimal separator

Поиск
Список
Период
Сортировка

ODBC problem with decimal separator

От
Mauro Gatti
Дата:

Hello,

 

we are upgrading psqlODBC from version 9 to 15 following the upgrade of the postgres database from version 11 to 15.

 

The application using psqlODBC is an old legacy application written in .NET Framework and we are facing a problem with the decimal separator.

 

The application is expecting the separator to be . (dot) and everything is working well, even if the OS locale have , (comma) as separator. The application then needs to open a browser to visualize a PDF file and from that moment on every numeric value returned from the ODBC driver will have comma as decimal separator which is misinterpreted from the application, showing mangled results.

 

My guess is that the Adobe library used to open the PDF is calling setlocale() to set the decimal separator equal to the OS locale (comma) and this is in turn propagated to the ODBC driver. Before the invocation, the decimal separator is undefined and set to the default locale (dot).

 

Does anyone know if there’s a way to instruct the driver to not apply the locale setting or have experienced something similar?

 

Regards,

 

 



Mauro Gatti  

.NET Developer

 
  

+39 0 226950535   

  
  
www.esseitalia.it
 
 
youtube
 
linkedin
 

 

Sede legale: Viale Andrea Doria, 7 - 20124 Milano (MI) – Italy

Sede Operativa: Via Giovanni Antonio Amadeo 59 - 20134 Milano - Italy

P.I. Milano, 09051640150 – C.C.I.A.A. 1266371

C.S. € 101.000,00 int. versato

Pentana Solutions accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in  writing. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Esseitalia is a Pentana Solutions company.