7. ASOLib—OpenROAD Server Library : ASOLib User Classes : uc_name_server_client Class : GetConnectionDetails Method
 
Share this page                  
GetConnectionDetails Method
This method connects to the Name Server on the default target machine (as specified in DCOMCNFG) and will request a connection signature for the application named in mandatory parameter p_v_name. The final connection to the named application will not be made. (To make the final connection, the Connect method can then be invoked, passing no parameters). 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, 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.GetConnectionDetails (p_v_name = 'Demo App 1');
ASONameServer.Connect();
2.
/* override the default uc_osca and REMOTESERVER instances */
MyOtherRemoteServer = REMOTESERVER.Create();
MyOtherOsca = uc_osca.Create();
ASONameServer.GetConnectionDetails (p_v_name = 'Demo App 2',
                                    p_rs     = MyOtherRemoteServer,
                                    p_UCOsca = MyOtherOsca);
ASONameServer.Connect();