3
I have a decimal field (18, 3) and in the application I use a Javascript plugin to format the entered values, so I pass the value so SQL Server 45.000.000.000, when I look at what was registered was that 45000000000.000, ie, he put 3 zeros more, He means it like I haven’t passed the decimal values. I have tried to make the mask in the American standard, and in the Brazilian standard.
What would be the best way to resolve this? How do you do in this situation?
---Edited---
I’m using the Entity framework,
[Required(ErrorMessage = "Campo obrigatório!")]
public decimal VlrObra { get; set; }
Code in data access class
public void Salvar(Obra obra)
{
db.Obra.Add(obra);
db.SaveChanges();
}
You already tried to send as 45,000,000,000?
– Guilherme Portela
Yes, he does the same thing. Alias at first was like this, then I switched to the American standard to see if it could be this.
– Alan Almeida
What code was used to insert it? Please ask the question?
– Leonel Sanches da Silva
But you said save
45.000.000.000
and when it does SQL appears45000000000.000
. If that is correct, for the return has set the decimals. But if you have45.000.000
, then it’s wrong. Try to send45.000.000.000,123
and see what comes back.– Tiedt Tech