The problem is that VBScript doesn't know what the Write value is. There are two ways that you can handle this. The first way is to define a constant for the value in your script and use your defined constant. The other way is to create a .wsf file and use the reference element to reference the type library so that the script recognizes the value. For example:
<job id="DataSocketExample"> <reference object="CWDSLib.CWDataSocket" /> <script language="vbscript"> Dim ds Set ds = CreateObject("CWDSLib.CWDataSocket") ' Note that the value is cwdsWrite, not Write ds.AccessMode = cwdsWrite MsgBox ds.AccessMode </script> </job>
I'm having trouble posting data from my script to the DataSocket Server. I used an example project from the web site that contained a DataSocket reader and writer to do a quick test of the DataSocket Server, and it works O.K. However, when I try run my script, I don't see data updates on the reader(which is set up in the ReadAutoUpdate mode).
The script is called by a third party application to post a data update, and it runs rather infrequently (maybe every 10 to 15 minutes). The script basically reads a block of data (ot type double) from the application's database into an array, and attempts to post this array to the DataSocket server. The attached code segment shows the key parts of the script. Am I setting up the DataSocket Write operation correctly?