Saltar al contenido principal
Versión: 20 R7 BETA

On Server Close Connection database method

$1, $2, $3 -> On Server Close Connection database method

ParameterTypeDescription
$1LongintUser ID number used internally by 4D Server to identify users
$2LongintConnection ID number used internally by 4D Server to identify a connection
$3LongintObsolete: Always returns 0 but must be declared

This command is not thread-safe, it cannot be used in preemptive code.

Description

The On Server Close Connection database method is called once on the Server machine each time a 4D Client process ends.

As for the On Server Open Connection database method, 4D Server passes three Long Integer parameters to the On Server Close Connection database method. On the other hand, no result is expected by 4D Server.

The method must therefore be explicitly declared with three Long Integer parameters:

 var $1;$2;$3 : Integer

This table details the information provided by the three parameters passed to the database method:

ParameterDescription
$1User ID number used internally by 4D Server to identify users
$2Connection ID number used internally by 4D Server to identify a connection
$3Obsolete: Always returns 0 but must be declared

The On Server Close Connection database method is the exact counterpoint to the On Server Open Connection database method. For more information and a description of the 4D Client processes, see the description of this database method.

Example

See the first example for On Server Open Connection database method.