01-19-2006 01:58 PM
01-19-2006 02:49 PM
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>
- Elton
01-20-2006 08:07 AM
01-20-2006 09:48 AM
Yes.
- Elton
01-24-2006 02:03 PM
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?