I'm trying to bulk copy data with 100+ columns into a SQL Server database table. The data may contain around 5000 -10,000 records per set. SqlBulkCopy
is throwing an error:
The given value of type String from the data source cannot be converted to type nvarchar of the specified target column.
NOTE: the data source and my table both have the same column types and lengths. Even though it is throwing the above exception.
Can anyone tell me where I'm going wrong? Many thanks in advance.