jdonahoe

jdonahoe

  • NA
  • 7
  • 0

Decimal Numbers get changed to Integers

Jan 3 2004 12:46 AM
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?

Answers (4)