LogiView

Command 'update'

     

This command determines the database table fields to be updated in case of a catenated Update instruction ('update', 'where', 'exec_update').

 

Syntax:

  update({VAR_LIST})
 

I/O parameters:

{VAR_LIST)

List of variables with values to be written to the database. For the specified variables a database access must be defined (in the "variable list" mask) describing the allocation of a variable to a certain table field.

In this case the specification of a Where clause in a database access definition of the variable is ignored; for this purpose the command 'where' is available for catenated Update instructions.

The database access of the forwarded variables (with no limitation of the number) is used to determine which table fields are to be updated.

The database access of the specified varaibles must be related to the fields in a single table.

-  
 

Return value:

 
-  
 

Example:

  Declaration of Variables
 
10 PRO_NAME="Test example Project 3"
20 update (PRO_NAME)
30 where ("T_PRO_DAT.C_ID"="12340000")
40 exec_update()

Variable definition:
PRO_NAME  S  "T_PRO_DAT.PROJ_NAME"
  Result:
  The record with the C_ID "12340000" is assigned the project name "Test example Project 3". The update is performed on database level.

Functions and commands: DB/Mask Interface