You can use the following constants with this data type:
- cwdsRead–Reads once when connected. You can trigger another read by calling the Update method.
- cwdsReadAutoUpdate–Reads when connected and automatically reads again if the data at the data source is updated.
- cwdsReadWriteAutoUpdate–Writes the current data once connected. The data is rewritten automatically if any attribute or value is set. Reads when connected and automatically reads again if the data at the data source is updated.
- cwdsWrite–Writes the current data once connected. You can trigger the write again by calling the Update method.
- cwdsWriteAutoUpdate–Writes the current data once connected. The data is rewritten automatically if any attribute or value is set.
Specifies the type of read or write connection the DataSocket makes when connecting to the data source or target.
Use the ConnectTo method to set the access mode as you connect.
If you connect with the cwdsRead or cwdsReadAutoUpdate access mode, the DataSocket data is read-only. Attempting to set the value or attributes generates an error. If the DataSocket is not connected, you can set the data value and attributes regardless of the access mode.
'Set the AccesMode and URL properties and connect
'to a data source
CWDataSocket1.AccessMode = cwdsRead
CWDataSocket1.URL = "http://myhost/pata_path"
'The AccessMode and URL can also be set with the
CWDataSocket1.ConnectTo "http://myhost/pata_path", cwdsRead