By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,096 Members | 1,348 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,096 IT Pros & Developers. It's quick & easy.

VB / MySQL different locale settings

P: 2
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
Share this Question
Share on Google+
4 Replies


Dököll
Expert 100+
P: 2,364
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
Expert 100+
P: 2,364
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

P: 2
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
Expert 100+
P: 2,364
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

Post your reply

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