Exposing DataSnap Server Methods

From RAD Studio

Go Up to DataSnap Server Application


Server methods in DataSnap are allowed in descendents of TPersistent, TDataModule and TDSServerModule. In order to have server methods in a module, only the two latter are accepted. You can choose to use the DataSnap Server wizard or you can create server methods using either File > New > Other > Delphi Projects > DataSnap Server > Server Module, or File > New > Other > Delphi Projects > Delphi Files > Data Module. TDataModule requires you to publish the methods by adding the Delphi compiler directive {$METHODINFO ON/OFF} around the class definition.

The module contains published methods that can be remotely invoked, but not all the parameter types are supported. The supported types are:

Both procedure and functions are supported, as well as out and var parameters.

Note: Overloaded methods are not supported.

See Also