Remote Basic ActiveX Control
The Remote Basic ActiveX Control can be used in PC programs written in Visual Basic to run Remote Basic subroutines on a Reality database. The control exposes a single class, cNISRbRscLink, which provides properties and methods to open and close a connection to an account on a Reality database and a method that runs a specified Remote Basic subroutine.
Configuration
Refer to the Reality External Components Installation Guide for details of how to install the Remote Basic ActiveX Control. You will also need to install the PCSNI software on the PC and configure it to provide connections to the hosts and databases you require. Remote Basic entries must be set up as follows:
- The protocol must be set to DDATCP.
- The port must be set to 1203.
- The entry must contain a DBase setting containing the name of a database entry in the on the host.
Refer to PCi Standard Network Interface for details.
When writing an application that uses the Remote Basic ActiveX Control, you must add a reference to the NIS RemoteBasic Objects component (COM). You can then create an instance of the cNISRbRscLink class, set the properties of this instance to specify the required Reality database, and a user-id and account on that database, and establish the connection by calling the OpenLink method.
Before you can call a Remote Basic subroutine, you must set the appropriate properties for connection to an account on a Reality database - you will need to use a user-id that has been set up as described in Setting up Security for External Access. Call the OpenLink method to establish the connection.
Running a Remote Basic Subroutine
You run a Remote Basic subroutine by calling the CallSubroutine method. You must specify the following:
- The name of the subroutine.
-
The number of parameters to be passed.
CallSubroutine can pass up to 20 parameters to the Remote Basic subroutine - refer to the documentation for the DataBasic subroutine concerned for details of the parameters required.
- For each parameter, a value or the name of a variable in which a value can be returned.
-
For each parameter, the mode to be used; that is, whether the parameter is:
- Just used to pass a value to the DataBasic subroutine (In).
- Just used to return a value from the DataBasic subroutine (Out).
- Used both to pass a value to and return a value from the DataBasic subroutine (InOut).
- Required by the DataBasic subroutine in order to the return a value, but that value will not be used in the Visual Basic program (Ignore).
Careful choice of parameter type can reduce network traffic. Refer to the documentation for the DataBasic subroutine concerned to find out which mode you should use for each parameter.
When you no longer need your connection to the database, you should disconnect by calling the CloseLink method.
See Also
cNISRbRscLink Class
cNISRbRscLink
Members
cNISRbRscLink Errors
cNISRbRscLink Examples