Hi,
My environment is LLBLGen v2.6 and I am hitting an Oracle database. The columns in the database that are mapped to decimal? types are number(38 ) nullable columns.
I am experiencing a strange problem. A user enters a decimal value into a text box, I parse it and assign it to an entity data member of type decimal?, the value is always rounded to 3 decimal places.
Here is a sample of the code:
formulation.UpperWeightLimitPct = rowControls.UpperWeightLimitPct.Text.Length > 0 ?
decimal.Parse(rowControls.UpperWeightLimitPct.Text) : new Nullable<decimal>();
formulation.LowerWeightLimitPct = rowControls.LowerWeightLimitPct.Text.Length > 0 ?
decimal.Parse(rowControls.LowerWeightLimitPct.Text) : new Nullable<decimal>();
formulation.NominalWeightPct = rowControls.NominalWeightPct.Text.Length > 0 ?
decimal.Parse(rowControls.NominalWeightPct.Text) : new Nullable<decimal>();
Why would the rounding error take place? I've checked the parsed values and the decimal places are preserved. It is when the value is assigned to the entity field (formulation.UpperWeightLimitPct, etc.) that the rounding occurs.
Thanks,
Mike