I'm trying to save the value 137421.20 in a SqlServer table with a field of type Numeric (8.2). But I get an error with the description:
"Parameter value 137421.20 is out of range."
I'm trying to enter the value in the FileTracker_TotalValue field
I'm using the Entity Framework and my model is with the following code:
public partial class ARQUIVO_GERADO_TRAILLER
{
public int ID_Arquivo { get; set; }
public string ArquivoTrailler_Conteudo { get; set; }
public int ArquivoTrailler_TotalLinhas { get; set; }
public decimal ArquivoTrailler_TotalValor { get; set; }
}
The call in the class that is entering the values is with the code below:
objArquivoGeradoTrailler.ID_Arquivo = 90;
objArquivoGeradoTrailler.ArquivoTrailler_Conteudo = "texto";
objArquivoGeradoTrailler.ArquivoTrailler_TotalLinhas = 477;
objArquivoGeradoTrailler.ArquivoTrailler_TotalValor = 137421,20;
db.ARQUIVO_GERADO_TRAILLER.Add(objArquivoGeradoTrailler);
db.SaveChanges();
I can insert this value directly into the database table, through an insert script. But by feeding the FileTracker_TotalValue attribute that is of decimal type I get the error described above.