ConnectionErrorEventArgs Class
Provides data for the ConnectionError event.
Namespace: DevExpress.DataAccess.Sql
Assembly: DevExpress.DataAccess.v17.2.dll
Declaration
Remarks
The ConnectionError event is fired when current connection parameters do not allow connecting to a data store (for instance, the database is inaccessible). You can handle the ConnectionError event and override the default behavior in this case.
To override default behavior do the following:
- Check the connection name for which the event has been raised using the ConfigureDataConnectionEventArgs.ConnectionName event parameter.
- Provide new connection parameters using the ConfigureDataConnectionEventArgs.ConnectionParameters property.
- Set the ConnectionErrorEventArgs.Handled property to true. This will cancel the default routine for providing connection parameters.
To cancel connecting to the data store, use the ConnectionErrorEventArgs.Cancel property.
To get the exception that caused the event, use the ConnectionErrorEventArgs.Exception property.
Inheritance
See Also