hello,
hope everyone is doing fine
I am saving value as 14356.78 in sql database, I can see value as 14356.78 in breakpoint.
But in database it is saved as 143568, which I don't want
The datatype i tried is decimal, float and varchar, still it is rounding off automatically
I want to prevent rounding off after saving in sql db
thank you !
Jignesh KumarRank #91 · 22.9K reputationPosted Nov 24, 2021, 12:14 PM EST
Hi Sushant,
I think issue with your table column datatype. Please check your column datatype if not decimal(10, 2) then make it.
Please use this script to change datatype,
ALTER TABLE your_tablename MODIFY your_column_name decimal(10, 2)
Note : If you are using store procedure apply same change like parameter as decimal(10, 2)
Srinivasan RamamoorthiRank #877 · 2.5K reputationPosted Nov 24, 2021, 10:24 PM EST
Sachin SinghRank #66 · 26.2K reputationPosted Nov 25, 2021, 1:59 AM EST
Guest UserRank #2,192 · 643 reputationPosted Nov 25, 2021, 4:39 AM EST
Sachin SinghRank #66 · 26.2K reputationPosted Nov 25, 2021, 5:28 AM EST
satheesh d190 reputationPosted Nov 26, 2021, 5:16 AM EST
Guest UserRank #2,192 · 643 reputationPosted Nov 29, 2021, 3:57 AM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts