|
Using this command, an 'Update' is executed for a field in the database and/or a field is written in the current mask. For this purpose the database access of the specified variable is evaluated and the variable value is entered in the database (whereby possibly existing values in this database field are overwritten) or in the corresponding field of the current mask. |
||||||
![]() |
This command allows long-text fields. |
||||||
If the current mask is set to the editing mode (this is the case if LogiView has been started as "pre-field", "post-field", "edit-action" or from the "pre-action" userexit in this mask), no data is entered in the database for the Where clause but the variable value is sent to the corresponding field of the current mask! In this process the pre- and post field userexit of the written field are called. This may cause endless loops if this process starts a decision table (and hence LogiView) in turn. By default, the change of the field contents is also changed in the database when saving the record. In all other cases an update is performed on database level. |
|||||||
![]() |
Please note, that this process changes all records that correspond to the Where clause of the database access defined for the variable! Access rights and locking conflicts (simultaneous access by several users) are not checked. The system attributes of the changed records are not kept and no integrity checks are performed! If the function is called with the Where clause 'actual' LogiView tries to read the value from the table field of the actual mask. |
||||||
Syntax: |
|||||||
upd_var({VAR}) | |||||||
I/O parameters:
|
|||||||
Return value: | |||||||
|
|||||||
Example: |
|||||||
Declaration of Variables | |||||||
10 if(strchr("IU",mode())>0) 20 upd_var(DOCU_FLOAT_DB_1) 30 endif |
|||||||
Result: | |||||||
(DOCU_FLOAT_DB_1 is defined as FLOAT variable with database access to "T_MASTER_STR.SIZE",actual) | |||||||
The value in field "SIZE" of the TABLE "T_MASTER_STR" is replaced by the value of the variable "DOCU_FLOAT_DB_1". | |||||||
![]() |
Functions and commands: DB/Mask Interface |