Hi,
I'm using SelfServicing, LLBLGen Pro 4.2.
I'm trying to convert some output of a webservice in the database.
One of the fields is a decimal field with two decimals.
I get an error storing 0.75 in this field.
The following comes from a log:
2017-03-30 21:04:13,775 [1] INFO HITc.Utilities.Service - Quality 4.50 0.55
2017-03-30 21:04:13,791 [1] INFO HITc.Utilities.Service - Quality 0 0
2017-03-30 21:04:13,791 [1] INFO HITc.Utilities.Service - Quality 0 0
2017-03-30 21:04:13,822 [1] INFO HITc.Utilities.Service - Quality 7.30 0.75
2017-03-30 21:04:13,822 [1] ERROR HITc.Utilities.Service - Probleem bij verwerken artikel 10013953
System.ArgumentOutOfRangeException: The precision of value '0.75' is larger than the precision of the field: '2' and will cause an overflow in the database.
Parameter name: GrossDensity
at SD.LLBLGen.Pro.ORMSupportClasses.EntityCore1.ValidateValue(IFieldInfo fieldToValidate, Object& value, Int32 fieldIndex)
at SD.LLBLGen.Pro.ORMSupportClasses.EntityCore
1.SetValue(Int32 fieldIndex, Object value, Boolean performDesyncForFKFields, Boolean checkForRefetch)
at HITc.SAP.EntityClasses.QualityClassEntity.set_GrossDensity(Decimal value)
at HITc.Utilities.Service.ProcesQualityClass(Int32 itemNO, QualityClassArrayItem qualityClass)
at HITc.Utilities.Service.ProcessCAMItem(ItemData1ArrayItem article)
at HITc.Utilities.Service.GetCAMItems()
Value 0.55 goes fine, 0.75 gives a problem.
These are string values that I have converted using the Convert.ToDecimal, decimal.Parse, Math.Round(System.Convert.ToDecimal(field), 2), .....
How to solve this?
Best regards,
Jan