Decimal Numbers get changed to Integers
I am using the Data Access Application Block for a data interface tier in my application. All data goes to and from the database (MSDE) without a problem, except for decimal numbers which get stored as integers. I can set the numbers to decimal values using the Server Explorer, but the next time I save them they are converted to integers again.
I use the following command to update the database:
SqlHelper.ExecuteNonQuery(conn2,CommandType.StoredProcedure,strCmd,sqlParms);
The decimal numbers are passed into the method as follows:
sqlParms[5] = new SqlParameter("@WeightPerPiece", SqlDbType.Decimal, 8);
sqlParms[5].Value = 7.5;
This is always stored as 8. What is wrong?
hcontrerasPosted Feb 11, 2005, 9:34 AM
swilderPosted Aug 27, 2004, 1:18 PM
p.jonesPosted Aug 27, 2004, 10:29 AM
swilderPosted Aug 25, 2004, 8:36 AM