Hello all, I need a little help.
I have written a C# application that receives data from a connected device. The connected device will pass over a floating point number ie 1.8897.
I have no problems storing the data if the locale is US - English, but when I change the locale to something where a decimal is represented by a comma my insert query is failing.
This query works if locale is US:
float tempfloat = 1.888; // Say this value was received from a device that represents decimals with periods
"INSERT INTO TABLE (PrimaryKey, isaFloatValue) VALUES(1, " + tempfloat + ")"
When the local is non US the query is transformed to look like this:
"INSERT INTO TABLE (PrimaryKey, isaFloatValue) VALUES(1, 1,888)" and generates the error below.
Basically the sql statement is failing with the following error "Number of query values and destination fields are not the same. Microsoft JET Database Engine"
Any help or suggestions are greatly appreciated!