I am receiving a dispensation from
Dapper Bulk Copy
It seems that the bulk copy procedure at the root is not working. I exported the data to json and discovered that the issue is
StackTrace: at System.Data.SqlClient.SqlBulkCopy.ConvertValue(Object value, _SqlMetaData metadata, Boolean isNull, Boolean& isSqlType, Boolean& coercedToDataFeed) ..... Inner Exception 1: InvalidOperationException: The given value of type Decimal from the data source cannot be converted to type decimal of the specified target column. Inner Exception 2: ArgumentException: Parameter value '259815703.34307606' is out of range
The desk has
and the API is tossing instead of storing with less accuracy.
The number that is saved instead of 10 as intended is 6 decimal after I tried the following, and it worked.
CREATE TABLE #t1(c1 DECIMAL(18,6)) INSERT INTO #t1(c1) values(259815703.3430760631)
I used decimal to resolve the problem. to six decimal places in rounds