Re: French, German, Italian SQL Query via ADO



No, the SQL-Query parser will keep the point (.) as the decimal separator.
You can easily verify that by setting your own WIndows machine to use the
comma instead of the point and make a test with SQL-Server.

Usually, when doing internationalisation, it's best to leave the conversion
between a characters string and a numerical value at the client side (many
client interfaces like .NET can automatically perform this kind of
conversion) and use only typed values to communicate with the SQL-Server.

The SQL-Server don't look at the regional options for most of its settings.
However, with each user (or login) account, there is a default language.
This is for formatting things like date or the default symbol for currency.
SQL-Server will use the default language association with the login or the
language that has been explicitely set; for example, run the following test:

set language english
select cast ('01-02-2007' as datetime)

set language french
select cast ('01-02-2007' as datetime)

Results:

2007-01-02 00:00:00.000
2007-02-01 00:00:00.000

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"UW" <UW@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0AC2EC12-A7F5-4C47-94E7-DD8789B190A7@xxxxxxxxxxxxxxxx

I am new to internalization and I have ran into a problem recently.

I have a SQL query generator which does something like:

1. Read double value from textbox
2. Convert it to double for some calculations.
3. Convert it back to string from double.
2. Attache the value to a SQL query

My question is when locale is FR or any country that uses comma(,) instead
of
period(.) for decimal does SQL Query parser magically takes decimal number
that is formated with comma? or do programmers from this country forced to
convert to period based numerics and run the query?

Obviously the code was developed in English only environment long time ago
and in the new environment evertyhing is locale set including DB
collation.

What do you think?



.



Relevant Pages

  • Re: DateTime
    ... The "set language" command is only in affect ... set dateformat dmy ... > can I change the datetime field in my db table to accept european time? ...
    (microsoft.public.sqlserver.server)
  • Re: handling ado errors
    ... access sets language back to english ... and displays english error. ... > Have you thought about translating the SQL-Server sysmessages table? ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Value Pack in Microsoft word
    ... The set language button under tools does not appear so that I can ... switch to the German language dictionary and grammer checker and ... > Daiya Mitchell, MVP Mac/Word ...
    (microsoft.public.mac.office.word)
  • Re: handling ado errors
    ... Have you thought about translating the SQL-Server sysmessages table? ... SQL-Server by itself does support localized errormessages and it does ... and set the appropriate language for the SQL-Server Logins you may ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Dictionary Detecting English Words as Spanish???
    ... and then use Tools, Language, Set Language to ensure that the language is ... Terry Farrell - MS Word MVP ... > So far, I have tried copying the text into a new document, copying into ...
    (microsoft.public.word.application.errors)