Datasnap.Win.ObjBrkr.TServerCollection.GetNextName

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: public
Source:
Datasnap.Win.ObjBrkr.pas
Datasnap.Win.ObjBrkr.hpp
Unit: Datasnap.Win.ObjBrkr
Parent: TServerCollection

Delphi

function GetNextName: string;

C++

System::UnicodeString __fastcall GetNextName();

Description

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

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.

See Also