TDSServerClass = class(TDSCustomServerClass)
class PASCALIMPLEMENTATION TDSServerClass : public Datasnap::Dscommonserver::TDSCustomServerClass
Component used to specify a server-side class with published methods that can be called from a remote client using dynamic method invocation.
TDSServerClass is a component that can be used to specify a server-side class with published methods that can be called from a remote client using dynamic method invocation.
Methods in this class can be called from remote clients, such as the DBX Client Provider or the ADO.NET provider.
Parameter Types Supported
Currently, using a TDBXValue is the fastest way to pass a parameter, because these are the internal objects used to manage parameter lists. When these parameter types are specified, the internal TDBXValue is passed directly to the application. Note, however, that since this is treated as a TDBXParameterDirections.IN_OUT_PARAMETER parameter, an application may want to call TDBXWritableValue.SetNull before returning from a method where the value can be large. Otherwise the value is sent back to the remote client.
The following list contains TDBXValue types that can be used as parameters:
The following list contains JSON-specific types that can be used as parameters:
Both var and out scalar value or string types are supported.
A server method's var parameters are treated as TDBXParameterDirections.IN_OUT_PARAMETER by a database client driver. A server method's out parameters are treated as TDBXParameterDirections.OUT_PARAMETER by a database client driver.
The following list contains the scalar value types supported:
The in and return scalar value types are supported.
A server method's in parameter is treated as a TDBXParameterDirections.IN_PARAMETER by a database client driver. A server method's return parameter is treated as a TDBXParameterDirections.RETURN_PARAMETER by a database client driver. The return value is available to the database driver client as the last parameter in the command's parameter list.
This list includes all of the scalar values that can be passed as var and out parameters, plus the following additional data types:
Also, any object that is derived from TObject can be passed as var and out parameters.
A server method can share access to a database connection with a client connection. A client connection can have only one association with a server-side database connection at a time. This database connection sharing with the client and server methods allows the client to execute SQL statements and SQL stored procedures using the same database connection and transactional context as the server methods that the client makes calls to. A client can share a database connection with a server method by calling a server method that returns a TDBXConnection instance. The TDBXConnection instance is not actually returned to the client. Instead, the TDBXConnection instance is used for all SQL statement and SQL stored procedure commands that are executed by the client. For convenience, this server method can be specified by setting the TDBXPropertyNames.ServerConnection property to the name of a server method that returns a TDBXConnection instance.
- Datasnap Server Controls
- Tutorial: Using a REST DataSnap Server with an Application
- Tutorial: DataSnap Application Using an ISAPI DLL Server