Question In Studio Express 2015 i get decimal with "." but in MySQL i get it in ","

krillenummer1

New member
Joined
Mar 27, 2016
Messages
1
Location
Sweden
Programming Experience
5-10
In Studio Express 2015 i get decimal with "." but in MySQL i get it in ","

Hi All!

I am writing an application where i can calculate different prices, but i hit a barrier.

When i read values from the database they are displayed like "1,6" but when i convert it to Double to get another value from the database it shows like "1.6" and therefore it is no match to the database.

I tried to write like this:
System.Windows.Forms.Application.CurrentCulture = New System.Globalization.CultureInfo("EN-US")

And like this:
System.Windows.Forms.Application.CurrentCulture = New System.Globalization.CultureInfo("SV-SW")

But then it is converted from 1,6 to 16, and i still dont get anything.

Can you please help me to figure out how i can do to display the decimal value in my application as "," correctly?

Value1 = Integer.Parse(ComboBox5.SelectedValue, num)
Value2 = Convert.ToDouble(ComboBox31.SelectedValue)

sql = "SELECT * FROM prodWeight WHERE Layers=" & Value1 & " AND Thickness=" & Value2

Best Regards,
Kristoffer
 
Back
Top