Hello!
I′m having some trouble with a database field that I had to redefine. At first, it was defined as an int, but I had to change it to decimal (5,2).
I have an application which is accessing my database. Problem now is that when if I enter a decimal value, say 3,12 into my field and then press save on my BindingNavigator, this value is instantly rounded to 3,00. I tried entering the value directly into my database, and that′s no problem. The rounding seems to happen on the update statement. I tried stepping through the code, and after this particular line, the value is rounded... Any help?
Me.OrdersTableAdapter.Update(Me.OrdersDataSet.Orders)
Regards
Daniel
This is totally an application issue -not a SQL Server issue.
The problem is that your application STILL thinks that the datatype is int. It needs to be provided the 'new' information that the datatype is decimal.
In your application code, Remove the binding and linkages between the datagrid and the database, and then re-create them.
|||Thanks alot,
I found that I could edit the datatypes defined in my TableAdapter′s insert and update statements,
now everything work fine!
Thanks again!
Daniel
No comments:
Post a Comment