I want to truncate a table before doing a SqlBulkCopy. Does SqlBulkCopy automatically truncate a table before copying the data?
+2
A:
No, not to my knowledge.
I don't see any options on the SqlBulkCopy class that would allow you to instruct SqlBulkCopy to truncate before loading.
You'll have to do that yourself before launching SqlBulkCopy.
marc_s
2009-08-07 21:07:20
A:
Is it possible to truncate the table from ado .net? Or do you need to call a stored proc to do that?
Prabhu
2009-08-07 21:26:56
Yes, it's possible, presuming you have the appropriate rights.
Adrien
2009-08-07 21:30:18