I'm not able to insert decimal values into Sql Server table.
What i'm trying to do is self explanatory through these lines of code:
long fileSizeInBytes = ComponentUploadControl.FileContent.Length;
Decimal fileSizeInMB = Convert.ToDecimal(fileSizeInBytes) / (1024.0m * 1024.0m);
Decimal fileSizeInMBRounded = Math.Round(fileSizeInMB, 2);
cmd.Parameters.Add("@fileSize", SqlDbType.Decimal).Value = fileSizeInMBRounded;
The value that is getting inserted into database is stripped of the decimal places. To be more specific if the fileSizeInMBRounded is 11.73, the value that is getting inserted into database is 11,00
Please help me
Thanks in anticipation