decimal separator - how to substitute a "," for a "." to allow correct SQL update?
Hi All,
This is driving me crazy please help!!!
My app saves numeric data to an Excel sheet using DAO and the following SQL command.
UPDATE [excelsheetname$cell:cell] SET F1 = data
When the decimal separator in Windows Regional Settings is a "." then all is ok. However if it is a "," then the problems begin.
The data variable in the SQL command above contans the "," character and the UPDATE command throws an error.
Is there a VB function that I can use to change the "," to a "." and still keep the data as numeric? ( I cannot save the data as a string ).
Surely there must be way of working in US / UK default of "."
I've been playing around with double.parse() but not getting anywhere.
Any ideas gratefully received.
Chris
I've posted this on a number of other forums so sorry if you've seen it elsewhere.
Hi All,
This is driving me crazy please help!!!
My app saves numeric data to an Excel sheet using DAO and the following SQL command.
UPDATE [excelsheetname$cell:cell] SET F1 = data
When the decimal separator in Windows Regional Settings is a "." then all is ok. However if it is a "," then the problems begin.
The data variable in the SQL command above contans the "," character and the UPDATE command throws an error.
Is there a VB function that I can use to change the "," to a "." and still keep the data as numeric? ( I cannot save the data as a string ).
Surely there must be way of working in US / UK default of "."
I've been playing around with double.parse() but not getting anywhere.
Any ideas gratefully received.
Chris
I've posted this on a number of other forums so sorry if you've seen it elsewhere.