ConnectionPreference Property (IPICollective interface)



A read/write property that indicates the connection preference that was used in the last explicit Open call to this server or when set, this preference is used to override the default connection preference setting when a server is opened.  The property is a string which takes the form ServerRole=connectionpreference; where the possible values for connectionprefrence are shown in the settings below.




The object placeholder is an object expression that evaluates to a IPICollective interface, obtained from a Server object.


The possible values assigned using the syntax SERVERROLE= are:

Setting Description
Any No preference in member server.  Use the individual priority settings of the member servers to select the target for connection.
PreferPrimary If the primary member server is available connect to that.  If not, then act as if Any were specified.
RequirePrimary Only the primary member server is acceptable for a connection.  If a primary member is not available return an error.


The preference is used to influence the selection of a member server when the collective is opened.  This same string format can be added to the connection string in the Server.Open method.

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:



E_INVALIDARG, E_POINTER Some of the function argument are not valid.
pseSERVERNOTCOLLECTIVE The Server is not a collective
Enabling Operational Intelligence