Ga naar inhoud

Modules server

Modules.Server

This unit contains * The RemObjects HTTP/TCPIP listening points. * The RemObjects session manager. * The Data Abstract connection manager, driver manager and data dictionary. * The FireDAC SQL logging

The ServerDatamodule singleton is created at program startup. It may not depend on other modules in the server.

The following methods are exposed:

ConfigServer

Configures the server (database location, TCP/IP ports etc)

procedure ConfigServer;

LogConfig

Display the server configuration in the Log

procedure LogConfig;

StartServer

Start the server: listening on the HTTP/TCPIP ports is started, connections are accepted at this point.

Procedure StartServer;

StopServer

Start the server: listening on the HTTP/TCPIP ports is stopped. Connections are no longer accepted at this point.

Procedure StopServer;

GetDefaultConnection

Get an instance of the Data Abstract database connection (IDAConnection)

Function GetDefaultConnection : IDAConnection;

GetDataset

Get an instance of a dataset with the given SQL on the default database connection.

Function GetDataset(Const SQL : String; RefreshParams : Boolean = True) : IDADataset;
Data abstract by default does not check parameters. The RefreshParams tells Data Abstract to parse the SQL and adapt the parameter list. It is set to True by default.

GetServerDataset

Get an instance of a server dataset with the given SQL on the default database connection. The server dataset differs in functionality from the Dataset.

Function GetServerDataset(Const SQL : String; RefreshParams : Boolean = True) : IDAServerDataset;
Data abstract by default does not check parameters. The RefreshParams tells Data Abstract to parse the SQL and adapt the parameter list. It is set to True by default.

OnServiceLog

Event handler property used to be able to log configuration to the service log.

Property OnServiceLog : TServiceLogEvent Read FOnServiceLog Write FOnServiceLog;

Active

When reading, returns whether the server is accepting connections. When writing, will call StopServer or StartServer depending on the value.

Property Active : Boolean Read GetActive Write SetActive;