jeet p

jeet p

  • NA
  • 19
  • 0

sqlbulkcopy

Jun 19 2009 2:12 AM
Dear All,

I have developed C# application to import data from CSV to SQL Server
using sqlBulkCopy. However I am facing couple of problems listed below

1. whole transfer fails when one record has column width issue (source column width is 30 and destination is 20) so how could I eliminate this row? or is there any work around?

2. my destination table has insert trigger defined. How could I manage to execute it as sqlbulkcopy dumps the whole bunch of records and not one by one record?

3. One column in destination table is computed column and is not included in the transfer, but the dependent column is included in source file (based on this column, computed column fills it data, while normal insert) but how do I fill values in computed column while dumping whole bunch of records?

4. If CDC(change data capture) is enabled on my target table, how SQLBulkCopy can log the data changes in the same?

regards
Jeet