RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TServerCollection.GetNextName Method

Returns the ComputerName property of the first available server in the Items property array.

Pascal
function GetNextName: string;
C++
__fastcall AnsiString GetNextName();

Call GetNextName to get the name of an available server. Servers in the Items property array are considered available when no connection attempts have failed (HasFailed is false) and their Enabled property has not been set to false. GetNextName selects the first available TServerItem in the Items property array and returns its ComputerName property.

Note: GetNextName always returns the same name as long as the servers' HasFailed and Enabled properties do not change. To choose an available server at random, use GetBalancedName instead.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!