Reputation: 1194
i am doing a bulk copy in c#, and its working fine except when i add a DateTime column to the DataTable the bulk copy throws an exception that The given ColumnMapping does not match up with any column in the source or destination.
, when i remove the DateTime column and execute the bulk copy things work normally
is there something extra i have to do when adding a DateTime column?
Upvotes: 0
Views: 3483
Reputation: 2673
From my experience the below are the possibilities to cause this kind of issues
Column names match in source and table That the column types match
Allow nulls in date\time columns in your table, then insert the null value through DataTable, If it works then the problem with data else mapping is the problem.
Upvotes: 2