columnmappings

How to use SqlBulkCopyColumnMappingCollection?

Hi I want to make one SqlBulkCopy method that I can use for all my bulk inserts by passing in specific data through the parameters. Now I need to do mapping on some of them. I don't know how to make a SqlBulkCopyColumnMappingCollection since that was my plan to pass in the mapping collection in and use it. However I don't know how to m...

Skip some columns in SqlBulkCopy

I'm using SqlBulkCopy against two SQL Server 2008 with different sets of columns (going to move some data from prod server to dev). So want to skip some columns not yet existed / not yet removed. How can I do that? Some trick with ColumnMappings? Edit: I do next: DataTable table = new DataTable(); using (var adapter = new SqlDataAdap...