P
Prodip Saha
I am trying to update a database field Numeric(12,2) using
DataAdapter.Update(Table). The update works but mysteriously all digits
after the decimal are truncated. If I try to update a value 999.99, I have
999.00 in the database!!!!
I checked the underlying column type in the table and it is System.Decimal.
The column is retaining all the digits when it is being passed on to the
DataAdapter to update the changed records. I use the OleDbCommandBuilder to
read the Parameters of the stored procedure that I use to update the
database. The amount field is defined as Numeric(12,2) in the stored
procedure but the Parameters collection reads the field type as
System.Decimal. As you can see my source column type and the parameter field
type are same BUT I loose the decimal.
I could have manually create the parameters and control the data types but
that is not an option when the fields are unknown.
Will appreciate if you can shed some lights.
Prodip Saha
DataAdapter.Update(Table). The update works but mysteriously all digits
after the decimal are truncated. If I try to update a value 999.99, I have
999.00 in the database!!!!
I checked the underlying column type in the table and it is System.Decimal.
The column is retaining all the digits when it is being passed on to the
DataAdapter to update the changed records. I use the OleDbCommandBuilder to
read the Parameters of the stored procedure that I use to update the
database. The amount field is defined as Numeric(12,2) in the stored
procedure but the Parameters collection reads the field type as
System.Decimal. As you can see my source column type and the parameter field
type are same BUT I loose the decimal.
I could have manually create the parameters and control the data types but
that is not an option when the fields are unknown.
Will appreciate if you can shed some lights.
Prodip Saha