System.Data Namespace FillErrorEventArgs Class
Returns the errors being handled.
Script |
[ Exception variable = ] FillErrorEventArgs.Errors |
variable |
The errors being handled. |
The property is read only with no default value.
The following example demonstrates how to catch and handle a FillError event. The examples assumes that you have created a SqlDataAdapter and a DataSet.
protected static void OnFillError ( object sender, FillErrorEventArgs args ) {
if ( args.Errors.GetType ( ) == typeof ( System.OverflowException ) ) {
// code to handle Precision Loss
args.Continue = true;
}
}
Private Shared Sub OnFillError ( sender As Object, args As FillErrorEventArgs )
If args.Errors.GetType ( ) Is Type.GetType ( "System.OverflowException" ) Then
' code to handle Precision Loss
args.Continue = True
End If
End Sub |
|
C# |
VB |
FillErrorEventArgs Members