GETARCHSTRUCT actions


Functions
Bulk read of archive values.
Declaration
 GETARCHSTRUCT archIdent, locRecDstIdent, timeIdent_TmA, statusIdent_Int

Parameters
archIdent in Reference to:
locRecDstIdent out Local variable - read result.
timeIdent_TmA in Identifier of Absolute time type.
statusIdent_Int out Read success.
archivInstance_Int in Optional identifier of 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 given time (the parameter timeIdent_TmA). 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. Local variable of „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 Object type).
     
  2. Object of Structured variable type
    Example:
    GETARCHSTRUCT SV.Struct, ...

    Request addressing is the same as described in the article 1.
     
  3. Local variable of 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 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. 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.

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