smallmoney
-
How can I get rid of the value of 3000.0000 since its datatype is money ? I would like it to be 3000, not 3000.0000. The code is: Dim pMoney As SqlParameter = New SqlParameter("@Money", SqlDbType.Money, 8) pMoney.Value = Trim(CInt(txtMoney.Text)) cmdUpdate.Parameters.Add(pMoney) Did I overlook something ? Thanks!
-
How can I get rid of the value of 3000.0000 since its datatype is money ? I would like it to be 3000, not 3000.0000. The code is: Dim pMoney As SqlParameter = New SqlParameter("@Money", SqlDbType.Money, 8) pMoney.Value = Trim(CInt(txtMoney.Text)) cmdUpdate.Parameters.Add(pMoney) Did I overlook something ? Thanks!
Hi there. The
SqlDbType.Money
type by definition has an accuracy to the 10,000th of a currency unit. If you are always working with integer types, you could useSqlDbType.Int
instead, or you can always leave your data in the currency type, and format it (by rounding for example) upon display. -
Hi there. The
SqlDbType.Money
type by definition has an accuracy to the 10,000th of a currency unit. If you are always working with integer types, you could useSqlDbType.Int
instead, or you can always leave your data in the currency type, and format it (by rounding for example) upon display.