7. ASOLib—OpenROAD Server Library : ASOLib User Classes : uc_name_server_client Class : Connect Method
 
Share this page                  
Connect Method
This method connects to the Name Server on the default target machine (as specified in DCOMCNFG) and requests a connection signature for the application named in parameter p_v_name. After the connection signature has been returned, it will be used to make a connection. Typically, p_rs and p_UCOsca are not passed. If multiple Name Server registrations share the same name, connection load balancing is attempted.
Optional parameters p_v_serverlocation and p_v_routing are used in the RemoteServer.Initiate call to the Name Server. These parameters can be used to override the client's default DCOM settings. For more information, see OpenROAD Client 4GL RemoteServer System Class (see OpenROAD Client 4GL RemoteServer System Class).
Depending on the configuration of the Name Server, it is possible that a second Name Server location may be returned instead of a connection signature. If this is the case then the same request will be made of the second Name Server (a third Name Server location will not be returned). This can assist with connection load balancing over multiple machines running the same application.
Parameters:
(p_v_name = varchar(32),
p_rs = REMOTESERVER default CurRemoteServer,
p_UCOsca = uc_osca default OSCA,
p_v_serverlocation = varchar(256),
p_v_routing = varchar(256))
Return Data Type: None
Examples:
1.
/* use the defaults OSCA and CurRemoteServer */
   ASONameServer.Connect (p_v_name = 'Demo App 1');
   . . .
2.
/* override the default uc_osca and REMOTESERVER instances */
   MyOtherRemoteServer = REMOTESERVER.Create();
   MyOtherOsca = uc_osca.Create();
   ASONameServer.Connect (p_v_name = 'Demo App 2',
                          p_rs     = MyOtherRemoteServer,
                          p_UCOsca = MyOtherOsca);