Status Property (Read Only)
Syntax
CWBinding.Status
Data Type
You can use the following constants with this data type:
- cwdsConnecting–DataSocket is in the process of connecting to the data source or target.
- cwdsConnectionActive–DataSocket is in the process of transferring the data or waiting for an update.
- cwdsConnectionError–DataSocket encountered an error connecting to the data source or target.
- cwdsConnectionIdle–DataSocket has connected to the data source and transferred the data.
- cwdsUnconnected–DataSocket is not connected to any data source or data target.
Purpose
Specifies the current status of the data connection.
Remarks
The value of this property is the same as the last status value passed to the CWBindingStatusUpdated event.
If an error is encountered while connecting to the source or target, the status indicates the last step attempted. The LastError and LastMessage properties describe the error.
Example
'Display the current status in the form
'[status:error] Message
'Create a reference to a CWBinding object
'on CWGraph1
Dim Binding As CWBinding
Set Binding = CWGraph1.CWBindings.Item(1)
Dim str As String
If (Binding.StatusUpdated) Then
str = "[" & CWBinding.Status & ":" & _
CWBinding.LastError & "]" & _
CWBinding.LastMessage
MsgBox str
End If