EVENT:  DataControl::onError

onError(SCode, Description, Source, CancelDisplay)

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.

The SCode parameter is an integer that is the status code of the error.

The Description parameter is a string that describes the error.

The Source parameter is a string that contains the query or command that generated the error.

The CancelDisplay parameter is a Boolean value that determines if a dialog box is displayed by the error. The default is False and a dialog box is not displayed. If True, a dialog box is displayed.

Code (VBScript):
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

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information