473,503 Members | 7,214 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB / MySQL different locale settings

2 New Member
Hi,

I've encountered an odd problem while working with VB2003 that connects to MySQL using the ODBC driver. Because of my locale settings VB uses a comma "," to separate decimal places whereas MySQL expects them to be separated by a period "." (obviously not reading my locale settings properly). Basically when I try to update the database with a variable of type double (or any other decimal type), MySQL returns an error. It only works if I convert the variable to a string and replace the comma by a period before updating, which isn't really a satisfactory solution. Did any of you encounter this perhaps? I would be really grateful for any help! Thanks!
Apr 2 '07 #1
4 1987
Dököll
2,364 Recognized Expert Top Contributor
Hi,

I've encountered an odd problem while working with VB2003 that connects to MySQL using the ODBC driver. Because of my locale settings VB uses a comma "," to separate decimal places whereas MySQL expects them to be separated by a period "." (obviously not reading my locale settings properly). Basically when I try to update the database with a variable of type double (or any other decimal type), MySQL returns an error. It only works if I convert the variable to a string and replace the comma by a period before updating, which isn't really a satisfactory solution. Did any of you encounter this perhaps? I would be really grateful for any help! Thanks!
Hey there Kosta!

How are your local settings read? Can you post the part with problem?
Apr 2 '07 #2
Dököll
2,364 Recognized Expert Top Contributor
Hey there Kosta!

How are your local settings read? Can you post the part with problem?
I would also like to suggest the following URL, keep handy:

http://www.programmingtutorials.com/default.aspx
Apr 2 '07 #3
Kosta
2 New Member
I would also like to suggest the following URL, keep handy:

http://www.programmingtutorials.com/default.aspx
Hi,

my regional settings are set to Croatian, where the numbers are in the following format:
123.456.789,00
Apr 4 '07 #4
Dököll
2,364 Recognized Expert Top Contributor
Hi,

my regional settings are set to Croatian, where the numbers are in the following format:
123.456.789,00
Did you try above link, you'd find it helpful. Please also look through:

http://www.sqlstrings.com/

This was found though the above. Please tell us what your Data Source Admin found. Have you tried to ping your location through DS Admin? You may need to add this information (123.456.789,00) in DS Admin, and out of your code, direct connection...

Please stay tuned if no help at all.
Apr 5 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3231
by: Ksenia Marasanova | last post by:
Hi, I have some problems with locale module. On my workstation, changing locale doesn't have effect: Python 2.3 (#1, Sep 13 2003, 00:49:11) on darwin Type "help", "copyright", "credits" or...
2
1633
by: Teis Draiby | last post by:
Does this already exist? Something like "\£" that would appear like a "," or "." dependent on the current locale settings. Examples: string stringValue = "1000\£54"...
33
5505
by: Joshua D. Drake | last post by:
Hello, I think the below just about says it all: http://www.commandprompt.com/images/mammoth_versus_dolphin_500.jpg Sincerely, Joshua Drake
2
3943
by: Mike Conmackie | last post by:
Greetings, Is there any way to force strftime() to ignore locale settings when formatting the resulting string? I have a requirement to create a specific date-time string format in UTC. ...
1
1297
by: Carl Howarth | last post by:
Hi there, I want my datagrid to display date in the UK format (dd/MM/yyyy), the server is set up to UK settings, but I am guessing the aspnet user has US settings ( i use the format expression...
4
1438
by: Gunasekaran Balakrishnan | last post by:
Hi, I am seeing a different sorting behaviour for varchar columns in Postgres 7.4.2. postgres 7.4.2 is ignoring case for varchar columns for "ORDER BY" commands where as 7.2.2 is not. I am...
6
3965
by: Piotr | last post by:
Hi, I have following problem: I use a form in excel to send data into mysql server, everything is ok unless I have to deal with decimals or data fields, this simple are not recognized. For...
8
3049
by: Tony B | last post by:
I have a string in a existing php script which is in the form "dd/mm/yyyy" and I need to convert it into a suitable format for mysql which is "yyyy-mm-dd" Is there a neat way of doing this in php ?
3
1597
by: Mario Ruggier | last post by:
Hi, i had the following problem when installing py3.0rc1 on a Mac OS X 10.5.5. On this system, the default locale values are: $ locale LANG= LC_COLLATE="C" LC_CTYPE="UTF-8" LC_MESSAGES="C"
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.