The
Unalterable property is used to configure the unalterability of a data file: the data file cannot be modified; only additions can be made.
You can:
- Find out whether a data file is unalterable or not (data file defined in the data model editor or through programming).
- Define the characteristics regarding the unalterability of a data file (when describing the data file through programming only).
Reminder: The inalterability of files:
- protects from programming errors by prohibiting modification or deletion (via HModify/HDelete functions or via a query).
- adds on each Record, a hash of the content of the Record. This hash is an HMAC(SHA256) whose key is derived from the file encryption password.
UnFichier is File Description
UneRubrique is Item Description
// Description du fichier de données "Client"
UnFichier.Name = "Client"
UnFichier.Type = hFileNormal
UnFichier.Unalterable = True
// Description de la rubrique
UneRubrique.Name = "Message"
UneRubrique.Type = hItemText
UneRubrique.Size = 40
HDescribeItem(UnFichier, UneRubrique)
// Valide la description du fichier de données
HDescribeFile(UnFichier)
Syntax
Finding out whether a data file is unalterable or not Hide the details
<Result> = <Data file>.Unalterable
<Result>: Boolean
- True if the data file is unalterable,
- False otherwise.
<Data file>: Character string
Name of the data file used. This name was defined in the data model editor or with the File Description type.
Defining the characteristics regarding the unalterability of a data file (data file defined through programming) Hide the details
<Data file>.Unalterable = <Unalterability>
<Data file>: Character string
Name of the data file used. This name was defined by the File Description type.
<Unalterability>: Boolean
- True if the data file must be unalterable,
- False otherwise.