DataAdapter.FillError 事件


在填充操作过程中出现错误时返回。Returned when an error occurs during a fill operation.

 event System::Data::FillErrorEventHandler ^ FillError;
public event System.Data.FillErrorEventHandler FillError;
member this.FillError : System.Data.FillErrorEventHandler 
Public Custom Event FillError As FillErrorEventHandler 


使用FillError事件,用户可以确定在错误发生后是否应继续执行填充操作。The FillError event allows a user to determine whether or not the fill operation should continue after the error occurs. FillError事件可能发生的情况的示例如下:Examples of when the FillError event might occur are:

  • 要添加到 DataSet 中的数据无法转换为公共语言运行时类型,且不会丢失精度。The data being added to a DataSet cannot be converted to a common language runtime type without losing precision.

  • 要添加的行包含的数据违反了必须对 DataSet中的 DataColumn 强制执行的约束。The row being added contains data that violates a Constraint that must be enforced on a DataColumn in the DataSet.