CWBindingStatusUpdated Event

Measurement Studio User Interface

CWBindingStatusUpdated Event

Syntax

Sub ControlName_CWBindingStatusUpdated( Index As Integer, Status As Long, Error As Long, Message As String)

Applies To

CWButton

CWGraph

CWKnob

CWNumEdit

CWSlide

Purpose

Generated when the status of the binding connection changes.

Remarks

The status changes as the connection is made and data is downloaded. The event also is generated if an error occurs.

The CWBindingStatusUpdated event occurs every time you try to connect to the data source specified by the URL. The event returns parameters for the status, a system error code, and a string describing the most recent progress or error. You can use these parameters to identify the cause of a problem or to report the progress. The CWBindingStatusUpdated event might be generated several times, depending on the data source to which you are trying to connect.

Parameters

Index As Integer

Index in the CWBinding collection of the binding that generated this event.

Status As Long

Status of the binding connection.

Error As Long

Error of the binding connection.

Message As String

Descriptive message of the connection status.

Example

Private Sub CWGraph1_CWBindingStatusUpdated(ByVal Index As Integer, ByVal Status As Long, ByVal Error As Long, ByVal Message As String)

  'Display the status of connection 1
  If Index = 1 Then
    Text1.Text = Message
  End If

End Sub

See Also

CWBindings

CWBinding

CWBinding.Status

CWBinding.LastError

CWBinding.LastMessage