G
Guest
I'm using framework 1.1 and SQLServer 2000. When I read decimal values from
the database into a DataSet and the show the value i e.g. a TextBox, an extra
zero is added to the end of the value. If the value is 20.35 in the database,
20.350 is shown in the TextBox. The field in the database is a decimal of
length 9, precision 18 and scale 3. Hence there is room for 3 decimals but I
have only two in the value I have stored. It seems like the framework always
fills out with zeros until the number of decimals set in scale always is
shown. If you look at the value in the watch window it is 20.35 but it seems
like the extra zero is added when converting the value to a String using
ToString().
Is there any way of just showing exactly the number of decimals I hav saved
in the database and get rid of this extra zero adding?
Thanks for help
Johan
the database into a DataSet and the show the value i e.g. a TextBox, an extra
zero is added to the end of the value. If the value is 20.35 in the database,
20.350 is shown in the TextBox. The field in the database is a decimal of
length 9, precision 18 and scale 3. Hence there is room for 3 decimals but I
have only two in the value I have stored. It seems like the framework always
fills out with zeros until the number of decimals set in scale always is
shown. If you look at the value in the watch window it is 20.35 but it seems
like the extra zero is added when converting the value to a String using
ToString().
Is there any way of just showing exactly the number of decimals I hav saved
in the database and get rid of this extra zero adding?
Thanks for help
Johan