Not sure on what am I doing wrong, I had to add a field to store some new tax value , and want to use MySQL table just to store the tax value, all adding or subtracting operations will be done by .Net , but somehow it seem that MYSQL always round it up this value,
In debug mode I follow the tax value checking for mistakes and somehow I round it that value in my code but no , up to the proc if the value is for example 10.2 in :" myCommand.Parameters.AddWithValue("gvtax", SqlDbType.Decimal).Value = Gtax " Gtax value is 10.2 ,
but when I check after in MySQL the value stored in the Gtax field is 10 . it round it up to the lower or higher is the decimal is above 5 .
my field inMYsql server is set as follow;
`Gtax` decimal(10,2) DEFAULT '0.00',
I tried to set the field as double, float and now decimal to no avail ..... not sure of what I am doing wrong, I google to find some solutions but the consensus seem to be to set the field to Decimal to have exact value .
Sure that I miss something so any help will be greatly appreciated.