Datasnap.DBClient.TCustomRemoteServer.AppServer

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property AppServer: Variant read GetAppServer;

C++

__property System::Variant AppServer = {read=GetAppServer};

Properties

Type Visibility Source Unit Parent
property public
Datasnap.DBClient.pas
Datasnap.DBClient.hpp
Datasnap.DBClient TCustomRemoteServer

Description

Contains the interface for communicating with the application server.

AppServer provides read-only access to the interface returned by the application server's remote data module (a descendant of IAppServer). If the remote data module is not a SOAP data module, client applications can communicate directly with the application server through this interface.

In Delphi, when calling methods directly using AppServer, the client application uses late binding. For details on how to improve on this, see Calling server interfaces.

Note: In C++, to call this interface, you must obtain a dispatch interface from this Variant. The dispatch interface has the same name as the application server's interface, but with the string "Disp" appended. Thus, if the remote data module in the application server is called MyAppServer, you can use AppServer to call its interface as follows:

Note: IDispatch* disp = (IDispatch*)(MyConnection->AppServer);

Note: IMyAppServerDisp TempInterface( (IMyAppServer*)disp);

Note: TempInterface.SpecialMethod(x,y);

Note: To use the IAppServer methods of the application server's interface, obtain an interface using the GetServer method instead.

See Also