因为错误是在处理完近几万条纪录之后出现的,很难捕捉。
更详细的错误信息:
2) Exception Information
*********************************************
Exception Type: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlErrorCollection
Class: 14
LineNumber: 43
Message: Cannot insert duplicate key row in object 'table1' with unique index 'INDEX_2'.
The statement has been terminated.
Number: 2601
Procedure: sp1_ipr
Server:
State: 3
Source: .Net SqlClient Data Provider
TargetSite: NULL
HelpLink: NULL
更详细的错误信息:
2) Exception Information
*********************************************
Exception Type: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlErrorCollection
Class: 14
LineNumber: 43
Message: Cannot insert duplicate key row in object 'table1' with unique index 'INDEX_2'.
The statement has been terminated.
Number: 2601
Procedure: sp1_ipr
Server:
State: 3
Source: .Net SqlClient Data Provider
TargetSite: NULL
HelpLink: NULL