Database & SQL

Moderators: None (Apply to moderate this forum)
Number of threads: 1174
Number of posts: 2221

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
sqlbulkcopy issues Posted by havejeet on 18 Jun 2009 at 11:14 PM
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






 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.