DB_REFRESH_TABLE action


Function
The action forces refreshing of the displayed data for user's views in the D2000 HI process (e.g. displayer of Browser type).
Declaration
DB_REFRESH_TABLE dbObjIdent[, retCodeIdent_Int] [ON procIdent]
DB_REFRESH_TABLE dbObjIdent TRANS transHandle [ON procIdent]
Parameters
dbObjIdentinReference to an object of Database table type.
retCodeIdent_IntoutIdentifier - return code (optional parameter).
transHandlein Identifier of a connection to a database obtained by calling the DB_TRANS_OPEN action.
procIdentin Identifier of D2000 HI process.
Return code
The value of the parameter transHandle_Int. See the table of error codes. It is possible to get extended error information.
Description
The action should be used, if data in table are being changed and it is necessary to display them for user's views (displayer of Browser type).

If retCodeIdent_Int is not given, the action makes a difference as a request to refresh data without waiting for a result (or termination of the refresh).

If this parameter (return code) is entered, the action will be terminated as soon as all Browser devices are terminated (procIdent must be set) in all opened processes D2000 HI.

If procIdent parameter is specified, only a defined D2000 HI process will be refreshed, if not, all opened D2000 HI processes will be refreshed.

If transHandle parameter is specified, this action only schedules a data refresh. The refresh is performed only when the transHandle transaction is committed with the DB_TRANS_COMMIT action. If the database operation is canceled (action DB_TRANS_ROLLBACK), data refresh will not be performed.
Note: The transHandle transaction can also be opened against another object of the Database type (other than the Database, which is the parent of the table whose data is in the displayer), but it is necessary that this object of the Database type has the same parent (the DBManager process) as the Database, which is the parent of the table whose data is in the displayer.

Note
If data in a table was modified by actions DB(S)_INSERT, DB(S)_UPDATE, DB(S)_INSUPD, DB(S)_DELETE, PG_INSERT, PG_UPDATE, PG_DELETE (in non-transactional mode), by action DB_TRANS_COMMIT (which commits at least one of previously mentioned actions) or directly by editing in Browser, then the D2000 DBManager process automatically refreshes this table's data in all Browsers, that have opened this table. Therefore it's not necessary to call DB_REFRESH_TABLE. Action DB_REFRESH_TABLE should be called to refresh data only if the data in a table was modified by  means different from above specified actions (e.g. by calling stored procedure, by action SQL_EXEC_DIRECT, etc.).

Related pages:

Napíšte komentár