C
Christopher DuBuc
Hello,
I am using VB.NET & SQL Server CE and I am trying to add
data to a FLOAT column using a variable of type SINGLE.
The problem I am having is that when I enter in a value
of say 2.9 in via a control (textbox) it ends up in the
database stored as 2.9000000000095367...etc.
More specifically: I extract a DataTable from the SQLCE
table with a DataAdapter, add a new row, update the new
row/column with the a SINGLE variable, and then save the
back to the database with a SQLCECommandBuilder table
update.
Is there a special conversion function I need to go from
SINGLE datatype to a FLOAT data column? Or do I have to
change everything to decimal datatype/ numeric data
column? I know that if I do a manual insert of 2.9 into a
FLOAT column via a SQL statement, then the exact value of
2.9 gets inserted...so why doesn't that work via a data
adapter?
Thanks in Advance,
Chris
I am using VB.NET & SQL Server CE and I am trying to add
data to a FLOAT column using a variable of type SINGLE.
The problem I am having is that when I enter in a value
of say 2.9 in via a control (textbox) it ends up in the
database stored as 2.9000000000095367...etc.
More specifically: I extract a DataTable from the SQLCE
table with a DataAdapter, add a new row, update the new
row/column with the a SINGLE variable, and then save the
back to the database with a SQLCECommandBuilder table
update.
Is there a special conversion function I need to go from
SINGLE datatype to a FLOAT data column? Or do I have to
change everything to decimal datatype/ numeric data
column? I know that if I do a manual insert of 2.9 into a
FLOAT column via a SQL statement, then the exact value of
2.9 gets inserted...so why doesn't that work via a data
adapter?
Thanks in Advance,
Chris