client_number

sql

FUNCTION client_number RETURNS INT

Parameters

cdp client context variable

Since version:

6.0, modified in 8.1

Description

Each client gets a unique number upon connecting with a server, which is fixed for the time the client is connected. The same number may be assigned to another client on new connection.

The client_number function returns the number of the client that called it. This function allows you to distinguish different clients.

Function values

This function returns the client number.

Example:

execute a procedure with all recently inserted records...

INSERT INTO TabAux (number, id, date) VALUES (client_number, idx,dtx);
...

FOR row AS curinserted INSENSITIVE CURSOR FOR
  SELECT id 
  FROM TabAux
  WHERE number = client_number
DO BEGIN
  CALL ProcAux(row.id);
END;
...