Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

sqlbulkcopy issues

havejeethavejeet Posts: 17Member
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?


Sign In or Register to comment.