摘要:
在new SqlBulkCopy对象的时候,设置一下SqlBulkCopyOptions选项即可,按位或运算SqlBulkCopyOptions.FireTriggers | SqlBulkCopyOptions.CheckConstraintsusing (SqlBulkCopy bulkCopy = new SqlBulkCopy(GlobalString.ConnectionString, SqlBulkCopyOptions.CheckConstraints | SqlBulkCopyOptions.FireTriggers)) { //...........} 阅读全文