Gets a value indicating whether there are errors in any of the rows in any of the tables of the DataSet to which the table belongs.
Assembly: System.Data (in System.Data.dll)
As users work on a set of data contained in a DataTable, you can mark each change with an error if the change causes some validation failure. You can mark an entire DataRow with an error message using the RowError property. You can also set errors on each column of the row with the SetColumnError method.
Before updating a data source with a DataSet, it's recommended that you first invoke the GetChanges method on the target DataSet. The method results in a DataSet that contains only the changes made to the original. Before sending the DataSet to the data source for updating, check the property of each table to see if any errors have been attached to the rows or columns in the rows.
After reconciling each error, clear the errors with the ClearErrors method of the DataRow.
The following example uses the property to check if a table contains errors.
Private Sub CheckForErrors(dataSet As DataSet) ' Invoke GetChanges on the DataSet to create a reduced set. Dim thisDataSet As DataSet = dataSet.GetChanges() ' Check each table's HasErrors property. Dim table As DataTable For Each table In thisDataSet.Tables ' If HasErrors is true, reconcile errors. If table.HasErrors Then ' Insert code to reconcile errors. End If Next table End Sub
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.