Sqlbulkcopyoptions.firetriggers does not fire trigger in the table

后端 未结 2 384
说谎
说谎 2021-01-28 02:20

I have a table with a trigger newly added to it.

When I try to run a batch file and upload the file using SqlBulkCopy it did not work.

After reading that addin

2条回答
  •  梦毁少年i
    2021-01-28 03:10

    I tried adding Checkconstraints as well but it says the same error.

    using (var bulkCopy = new SqlBulkCopy(connection, SqlBulkCopyOptions.FireTriggers | SqlBulkCopyOptions.CheckConstraints))

    Is there another way to do it?

提交回复
热议问题