Nobody can answer! Problem with commas and dots
Thanks for your replies. I tried all of above, but nothing works.
Results:
------------------
Per Jessen: Your code works only with values with a single comma. If i have
larger values like 100,400.60 - it does not. That would result in wrong
values
------------------
Peter T:
Application.International(xlDecimalSeparator) = The output result is ","
If i force the separator as dot, the execute command will still send the
value with comma:
With Application
.DecimalSeparator = "."
.UseSystemSeparators = False
End With
"INSERT INTO company (salary) SELECT " & ActiveSheet.Cells(8, 5))
Result = "INSERT INTO company (salary) SELECT 1400,50"
------------------
NickH:
"INSERT INTO company (salary) SELECT " & Format(ActiveSheet.Cells(8,
5),"0.00")
Result = "INSERT INTO company (salary) SELECT 1400,50"
It still uses commas.
------------------
It's really a tough problem. I also think it should read them in "raw" mode
where there is no comma, but for some reason it does. My regional setting in
control panel is Finnish.
What to do? This really seems like a question with no answer..
|