Products Downloads


French version


 

The Adelia instructions which enable the subfile loading by static query are the SQL_SFL and E_SQL_SFL instructions.

They delimit an SQL query block and identify which fields are to be loaded:

 

SQL_SFL n SeriesVarId

+ query

+

E_SQL_SFL

 

Where

n

SeriesVarId

: Number of the subfile to fill.

: Names of the screen variables to load, separated by a space.

 

Adelia then declares a working file (SQL cursor) in which the query results are stored.

This file is then automatically re-read when loading the subfile.

 

For example

SQL_SFL 1 ZCOMAT ZLINAM

: Designates subfile *1 and loads fields

 

: ZCOMAT ZLINAM from the HP#PERP file when the

+SELECT PCOMAT PLINAM

: field PCOSER equals the value of internal

+FROM HP#PERP

: variable in model ZCOSER.

+WHERE PCOSER = :ZCOSER

:

E_SQL_SFL

:

*

: Subfile loading loop. Adelia automatically

CLEAR 1

: reads the working file (cursor) resulting

MANAGE_SFL 1

: from the SQL execution.

UPD_SFL

 

END_MANAGE_SFL

 

*

 

 

 

 

↑ Top of page