Re: Internation Currency & Number formats
- From: "Tony Proctor" <tony_proctor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 8 Dec 2005 11:59:48 -0000
Use Str() instead of CStr() or Format() to generate the decimal value in the
SQL query. The Str() function always uses the "." decimal separator, as does
the SQL, MDX, VB, and most programming/query languages
Tony Proctor
"Antony" <Antony@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2ED5A33C-1F06-4097-8D42-5CFB598435B3@xxxxxxxxxxxxxxxx
> We are building a german version of our english product in VB6 using ado
> connecting to a sql2000 database.
> Most of the sql queries are built on the fly in VB and executed using ADO
> connection.execute method.
> The problem I have come across is that by default setting the country to
> Germany changes the decimal separator from "." to "," so now whereever a
> currency or number with a decimal amount forms part of a query
insert/update
> the query fails because
> of the comma.
> The obvious solution is to perform a replace on the current figures before
> executing the query. Is there a more generic approach? We will probably
> translate our product into many different languages as the need arises so
I'd
> rather put code in place now to handle all the standard formats.
>
> Many thanks for your time
> Antony
.
- Prev by Date: Re: Byte array as string?
- Next by Date: Re: How can VB exe return value?
- Previous by thread: Data Report and Pictures
- Next by thread: Re: How can VB exe return value?
- Index(es):
Relevant Pages
|
Loading