CONNX OLE RPC Server
The CONNX OLE RPC server enables RPC (remote procedure calls) from any programming language that supports OLE 2.0, including Microsoft Word, Microsoft Excel, Microsoft Visual Basic, Microsoft Access, and Paradox for Windows. The server is supported by VSAM, RMS, Oracle Rdb, and DBMS databases. The CONNX OLE server object is called CONNX.Connect.
In Visual Basic, use the following code to connect to this server object:
Dim gOleConnect as Object
Set gOleConnect = CreateObject("CONNX.Connect")
The following table contains a detailed description of the properties and methods used in the CONNX OLE server object.

Property | Property Type | Description
Node | String Read/Write | The node to which CONNX attempts to connect. Node name must be set before using the Connect method.
UserName | String Read/Write | VAX account name used to connect to the VAX. UserName must be set before using the Connect method.
Password | String Read/Write | Accompanying password for the UserName property. Password must be set before using the Connect method.
LastResultCode | String Read only | Contains the result code for the last method called.
LastErrorMessage | String Read only | Contains the text of the translated error code for the last method called.
InputValue | Long Write only | Contains the input string for the RPC method.
InputValueLength | String Write only | Contains the length of the input string for the RPC method.
OutputValue | String Read only | Contains the output string for the RPC method.
OutputValueLength | Long Read/Write only | Contains the maximum length of the output string for the RPC method.

The following table includes descriptions of the connect methods used with the OLE RPC server.

Method | Description
Connect | Uses the stored properties UserName, Password, and Node, to connect to the VAX. The result code of the connection attempt is stored in LastResultCode.
Disconnect | Closes the RPC connection to the VMS server. This is the last method called to the CONNX OLE object.
RPC (RPCName as a string) | The RPC method uses the stored properties InputValue, InputValueLength, and OutputValueLength to execute the RPC specified in the parameter RPCName. The result code of the connection attempt is stored in LastResultCode. The result buffer is returned in OutputValue. To execute a DCL command under VMS, the RPC name must begin with ""$."" RPCs can consist of more than one command. Each command must be separated by a newline character, each line must begin with ""$."" Example: The following example performs a directory and then shows the current VMS time. gOleObject.RPC ""$DIR/n$SHOW TIME""