|
This function combines a select, update, or insert instruction from the transferred parameters of commands called up previously and executes the instruction (using a virtual widget).
After error-free processing the function returns an integer value with the number of data records.
|
 |
This command must not be called in a conditional instruction. |
|
Syntax:
|
|
{INT_VAR}= execute({NUM_EXPR}) or
{INT_VAR}= execute({NUM_EXPR},choose) or
{INT_VAR}= execute({NUM_EXPR}, {STR_EXPR})
|
|
I/O parameters:
 |
{NUM_EXPR} |
Number of records to be selected, inserted, modified, or deleted (since the argument is a numerical expression, only the integer part is considered).
1 |
Exactly one record |
n (>1) |
The (first) n records |
0 |
All matching records, not possible when inserting data with 'insert_ent', 'insert_ref', or 'insert_typ'. |
|
 |
choose |
This keyword can only be used when selecting records ('select_ent', 'select_agg', 'select_ref', 'select_typ').
It forces the display of an interactive widget with all matching records if more than the specified number of data records are found. (Without this keyword only the first n matching records are displayed).
|
|
{STR_EXPR} |
In addition to the 'choose' keyword search, the following options are available for an interactive selection of matching records:
/MAX_REC=limit |
Limits the maximum number of records in the interactive selection widget to the specified number of entries (default value is 1000). |
/NO_QUERY |
Suppresses a selection in a virtual widget and immediately opens an (empty) interactive selection widget that allows the user to search and select one (or several) records. |
/MESSAGE=msg_id |
Defines the ID of a user-defined message that will be sent instead of the default message ("Please select a record...") if the user is prompted with an interactive record selection. |
|
 |
- |
|
|
|
Return value:
|
|
 |
{INT_VAR} |
Number of records. |
|
|
Example:
|
|
Declaration of Variables |
|
20 C -- Allows users to select the file to be viewed if there is
more than one
30 select_ref("EDB-DOCUMENT EDB-FILE STR EDB-DOC-FIL-RLI-APP")
40 var(EP_FIL_CID,EP_FILE_ORGNAM,EP_FILE_TYPE)
50 where_ent("T_DOC_DAT.C_ID" = EP_DOC_CID)
.. ..
100 DOCU_INT_1 = execute(1,"choose /MESSAGE=EDB-FIL-SEL-VIE")
|
 |
Functions and commands: DB / Mask Interface
|