|
|
|
|
|
- Enabling the management of integrity
- Disabling the integrity rules
- In HFSQL Client/Server mode
HSetIntegrity (Function) In french: HGèreIntégrité
Available only with these kinds of connection
Enables or disables the management of an integrity constraint on a file link. Remark: By default, all integrity rules defined in the analysis description are enabled.
HSetIntegrity(CustomerOrder, hCardinality, False)
HSetIntegrity("*", "*", hCardinality + hOnUpdate + hOnDelete, False)
CtSourceFile is Connection
CtLinkedFile is Connection
HSetIntegrity(CtSourceFile, CtLinkedFile, CustomerOrder, ...
hCardinality + hOnUpdate + hOnDelete, False)
Syntax
Enabling or disabling the management of an integrity constraint by specifying the file name Hide the details
<Result> = HSetIntegrity([<Link to use>] [, <Data file>] [, <Integrity constraint>] , <Management mode>)
<Result>: Boolean Former management mode of integrity (before the call to HSetIntegrity): - True if the management of integrity was enabled,
- False if the management of integrity was disabled.
If <Link to use> = "*" or if <Data file> = "*", <Result> is set to True if the integrity was enabled for at least one link or for at least one data file in the former management mode of the integrity. <Link to use>: Optional character string Name of relevant link (name made of the different data files involved in the link). If this name is not specified or if it is equal to "*", the new integrity management is applied to all links defined in the analysis. <Data file>: Optional character string Name of the data file used. If this parameter is not specified or of it is equal to "*", the new management is applied to all the data files involved in the link (including the aliases). If <Link to use> corresponds to "*", this parameter must also correspond to "*". Indeed, you cannot enable or disable all the integrity constraints for all links found in a specific data file. <Integrity constraint>: Optional Integer constant (or combination of constants) Used to define the integrity constraints that must be managed. If this parameter is not specified, the new management mode is applied to all link constraints. | | hCardinality | Check the link cardinalities. | hOnDelete | Integrity rule applied during a deletion. | hOnUpdate | Integrity rule applied during a modification. |
<Management mode>: Boolean - True if the integrity constraint is enabled,
- False if this management must be disabled. If only this parameter is specified, the management mode is applied to all data files.
Enabling or disabling the management of an integrity constraint by specifying the connection of data file Hide the details
<Result> = HSetIntegrity(<Source data file connection> [, <Linked data file connection>] , <Link description> [, <Integrity constraint>] , <Management mode>)
<Result>: Boolean Former management mode of integrity (before the call to HSetIntegrity): - True if the management of integrity was enabled,
- False if the management of integrity was disabled.
<Source data file connection>: Character string or Connection variable Connection to which the link source data file belongs. This connection corresponds to: <Linked data file connection>: Optional character string or Connection variable Connection to which the linked data file of the link belongs. This connection corresponds to: If this parameter is not specified, both data files will belong to the same connection (<Source data file connection>). <Link description>: Link Description variable Name of the Link description variable that contains the characteristics of the link. <Integrity constraint>: Optional Integer constant (or combination of constants) Integrity constraints that must be managed. If this parameter is not specified, the new management mode is applied to all link constraints. | | hCardinality | Check the link cardinalities. | hOnDelete | Integrity rule applied during a deletion. | hOnUpdate | Integrity rule applied during a modification. |
<Management mode>: Boolean - True if the integrity constraint is enabled,
- False if this management must be disabled. If only this parameter is specified, the management mode is applied to all data files.
Remarks Enabling the management of integrity If an operation performed on a data file triggers a violation of an integrity constraint on an active rule, the operation is not performed and provokes the error of the function. In this case, HErrorIntegrity returns True. Disabling the integrity rules Disabling an integrity rule means the possibility not to comply with the constraints specified during the description of the data files in the data model editor. Therefore, disabling an integrity rule should be done with great care: it must be used advisedly.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|