GETARCHSTRUCT actions


Functions
Bulk read of archive values.
Declaration
 GETARCHSTRUCT archIdent, locRecDstIdent, timeIdent_TmA, statusIdent_Int
Parameters
archIdentinReference to:
locRecDstIdentoutLocal variable - read result.
timeIdent_TmAinIdentifier of the Absolute time type.
statusIdent_IntoutRead success.
archivInstance_IntinOptional identifier of the Int type - identification of archive instance. If the parameter is not defined, the value 0 will replace it.
Description
The parameter archIdent represents structure or structured historical value. For each item, the action generates a request for reading its historical value in the given time (the parameter timeIdent_TmA). The read result of each item is written into corresponding item of the local variable _locRecDstIdent. The action resizes the local variable if necessary. The structure types of the parameters archIdent and _locRecDstIdent must be the same.

The parameter archIdent can be defined by one of the following ways:

  1. A local variable of the „typed ALIAS“ type
    Example:
    ALIAS (structure definition) _lAT
    SET _lAT AS SV.Struct
    GETARCHSTRUCT _lAT, ...

    Individual read requests are ALWAYS addressed to items of the structure SV.Struct (even if any of the items are of the Object type).
     
  2. An object of the Structured variable type
    Example:
    GETARCHSTRUCT SV.Struct, ...

    Request addressing is the same as described in the article 1.
     
  3. A local variable of the Record type
    Example:
    RECORD (structure definition) _lRec
    REDIM _lRec[1]

    SET _lRec[1]^Item1 AS Sec
    SET _lRec[1]^Item2 AS SysTime
    SET _lRec[1]^Item3 AS M.MeranyBod
    .....

    GETARCHSTRUCT _lRec, ...

    All the columns of the structure definition must be of the Object type. Individual read requests are to be addressed to the objects the row items refer to.
    If any item does not refer to object, the action is to be terminated and returns the ERR_NO_ASSIGNED_ALIAS error.
     
  4. A structured archive object
    Example:
    GETARCHSTRUCT H.Struct, ...

    Individual read requests are to be gradually addressed to all items. The object H.Struct cannot be a one-column historical value.

The value of parameter archivInstance_Int defines the instance of archive which executes the request. If the parameter is not defined (or the value is 0), the active instance of archive will execute the request.


Related pages:

Napíšte komentár