SQL Bulk Copy

Batched updates are great, but SQL Server offers a much more efficient approach for submitting new rows to the database. SQL Server’s Bulk Copy Protocol features, commonly referred to as BCP, have been available since the early days of SQL Server, predating ODBC.

BCP is powerful and extremely fast because SQL Server allows you to insert rows via BCP that bypass many SQL Server operations, such as firing triggers or enforcing constraints. However, many developers have traditionally found BCP frustrating, a bit archaic, or both because it required placing the data to import in specially formatted files.

ADO.NET 2.0 introduces a new class, SqlBulkCopy, specifically designed to help developers access SQL Server’s BCP features. Rather than ...

Get Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.