Important-
This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Applications that use RDS should migrate to WCF Data Service.
The onError event is deprecated in ADO.
This event can be fired to handle errors encountered by DataControl.
The onError event can be fired to handle errors generated by the DataControl object.
An event is simply a subroutine that can be called automatically after a specific operation has occurred. This subroutine can contain any code that you need to run when the event occurs. The subroutine will only be called if it is included in your code.
There are four parameters passed to this event.
Private Sub objDC_onError( SCode, Description, Source, CancelDisplay )
' place any code you desire here, for example
If CancelDisplay = False Then
CancelDisplay = True
End If
End Sub