SQL Bulk Stored Procedure call C#

.net, bulkinsert, c#, sql

Solution

You cannot do that.

Bulk copy is a firehose dump of data into a table, you cannot call sprocs or anything else instead of just dumping it into an existing table.

What you can do, however, is dump the data using bulk copy into a temporary table with the right structure, and then afterwards call your sproc that moves that data into the real tables, possibly by modifying existing data instead of inserting it, or whatnot.

Problem

How do I call stored procedures in bulk? I would like to do something like a bulk copy. All that the stored procedure does is 8 selects for unique constraint and 8 inserts. With no returning value.

Original source