ON DB_CHANGE
ON DB_CHANGE action
Declaration
ON DB_CHANGE tableIdent GOTO [procName [PRTY prtyIdent]| NONE]Parameters
tableIdent | in | Identifier of the object of the Table type. |
procName | in | Name of RPC procedure in ESL script. |
prtyIdent | in | Optional identifier of the Int type. A priority when calling RPC. |
Description
Action defines a procedure (by the name procName) which will be called when the values in database table are changed. This change is identified by the D2000 DbManager ON DB_CHANGE which is the only one process executing a database operations in the D2000 system. If it identifies some change, it will automatically generate a command for calling the registered RPC procedure.
The keyword PRTY enables to set the priority of executing registered RPC procedure. The priority is defined by the parameter prtyIdent after PRTY.
Action ON DB_CHANGE tableIdent GOTO NONE will cancel the calling of procedure when the table is being changed. One table can have (in context of ESL script instance) only one procedure for handle of its change. That is why the repeated registration of handle for one table will cause ESL run-time error and the script failed.
The declaration of the procedure procName must be following:
RPC PROCEDURE ProcName (IN INT _dbTable, IN INT _actionId)
END ProcName
RPCX can be used instead of RPC.
The value of formal parameter _actionId can be one of the following options:
_actionId | 0 | Monitoring of the table has started successfully. |
_actionId | 1 | Initialization of table monitoring failed because of one of the following reasons:
|
_actionId | 10 | D2000 DbManager is executing the action DB_REFRESH_TABLE or a structure definition configured on object of Table type has been saved. |
_actionId | 11 | D2000 DbManager has finished the operation DB_*, DBS_* PG_* or some operation has been executed over the table from process D2000 HI by user interface. |
_actionId | 12 | The table has been deleted from configuration of application. |
_actionId | 13 | The active instance of the D2000 DbManager process changed its status to passive or in redundancy the D2000 Server to which the D2000 DbManager process is connected changed its status from HOT to SBS. It is necessary to re-register at new active instance of the D2000 DbManager process via action ON DB_CHANGE. |
Related pages: