Version

OnConnectionError Method

Called in response to a failure to open or close the Connection.
Syntax
'Declaration
 
Protected Overridable Sub OnConnectionError( _
   ByVal sender As Object, _
   ByVal args As DataProviderErrorEventArgs _
) 
protected virtual void OnConnectionError( 
   object sender,
   DataProviderErrorEventArgs args
)

Parameters

sender
The IDbConnection implementation that could not be opened or closed.
args
Event arguments for firing the DataProviderError event.
Remarks

Inheritors may override this method to supplement it with their own error handling or recovery processing, however they must ensure the base method implementation gets called to fire the DataProviderError event and perform other necessary clean-up.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also