MySQL Lists are EOL. Please join:

List:MySQL ODBC« Previous MessageNext Message »
From:Michael Widenius Date:April 25 1999 12:03pm
Subject:Re: Why setlocale(LC_NUMERIC,"English") in ODBC driver
View as plain text  
>>>>> "Kari" == Kari Lempiainen <kari@stripped> writes:

Kari> On Thu, 22 Apr 1999 05:05:27 +0300 (EEST), you wrote:
>> The problem is that the SQL standard requires numbers to have '.' and
>> not ','.
>> MyODBC sets the locale to '.' to fix some problems in some
>> applications involving ','.
>> (Before I added the English locale, MyODBC had a lot of problems with
>> some applications in different locales)
>> As MyODBC normally returns float/double as floating point values, the
>> locale shouldn't affect most applications.
>> What exactly didn't work for you and what did you change to get this
>> to work?

Kari> Hi Monty,

Kari>  The trouble was importing data to Microsoft Access and Excel thru
Kari> odbc interface. I have a column which is type double and both Excel
Kari> and Access imported data as integers (decimals dropped). If I remember
Kari> correctly, I first commented the setlocale(LC_NUMERIC,"English") in
Kari> the function SQLGetData. After that Access and Excel worked ok. Then I
Kari> tried making a job in MS SQL Server 7.0 to periodically import that
Kari> table to SQL Server. It imported only integers... Then I commented all
Kari> the setlocale(LC_NUMERIC,"English") lines (4 of them), and now SQL
Kari> Server imported the data ok.

Kari> Cheers,
Kari> Kari
Kari> --
Kari> Kari Lempiainen
Kari> kari@stripped - PGP key ID: A7377049
Kari> "And what exactly is a dream..." -- SB

Thanks for the update; The next MyODBC version will have an option on
the connect screen to enable you to remove setlocale() handling.

Why setlocale(LC_NUMERIC,"English") in ODBC driver(Kari Lempiainen)21 Apr
  • Why setlocale(LC_NUMERIC,"English") in ODBC driverMichael Widenius22 Apr
    • Re: Why setlocale(LC_NUMERIC,"English") in ODBC driver(Kari Lempiainen)22 Apr
      • Re: Why setlocale(LC_NUMERIC,"English") in ODBC driverMichael Widenius25 Apr