Skip to content
Advertisement

Tag: sqlbulkcopy

SqlBulkCopy error: The locale id ‘0’ of the source column .. and the locale id ‘1033’ of the destination column .. do not match

I know there are similar questions but I still haven’t found the answer to this problem. My setup is the following. Source table: Destination table: SqlBulkCopy call: Working scenario: If my reader executes the query SELECT * FROM BulkTable the sqlBulkCopy works fine. Non-working scenario: this logic must be generic and sometimes I am using a select query that joins

C# BulkCopy.WriteToServer Changing Values

I have a datatable that is created from and excel sheet. I am trying to SqlBulkCopy.WriteToServer. When I do so it converts my “Percent” value to 0 when my tables schema has type Decimal(38,0) for the “Percent” column. However, it inserts correctly when I have the Data Type as Float. I am not sure what is going on. I would

Advertisement