NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataError Constructor

Initializes a new instance of the DataError class.

Overload List

Initializes a new instance of the DataError class.

[Visual Basic] Overloads Public Sub New()
[C#] public DataError();
[C++] public: DataError();
[JScript] public function DataError();

Initializes a new instance of the DataError class using the specified error text.

[Visual Basic] Overloads Public Sub New(String)
[C#] public DataError(String);
[C++] public: DataError(String*);
[JScript] public function DataError(String);

Example [Visual Basic]

Note   This example shows how to use one of the overloaded version of the DataError constructor. For other examples that may be available, see the individual overload topics.

[Visual Basic]

Private Sub SetErrors()
   Dim t As DataTable
   ' Get table 0 of a DataSet.
   t = DataSet1.Tables(0)
   Dim i As Integer
   ' Declare temporary DataError variable.
   Dim de As DataError

   ' Set DataError objects for 10 rows.
   For i = 1 To 10
      de = New DataError("Row Error: " & t.rows(i)(1))
      t.Rows(i).Error = de
   Next
End Sub

See Also

DataError Class | DataError Members | System.Data Namespace