PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

New WINDEV, WEBDEV, WINDEV Mobile 25 feature!
  • Enabling the management of integrity
  • Disabling the integrity rules
  • In HFSQL Client/Server mode
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 22 and later
Android Widget This function is now available in Android Widget mode.
Java This function is now available for Java applications.
Android This function is now available for Android applications.
New in version 22
Android Widget This function is now available in Android Widget mode.
Java This function is now available for Java applications.
Android This function is now available for Android applications.
Android Widget This function is now available in Android Widget mode.
Java This function is now available for Java applications.
Android This function is now available for Android applications.
Example
// Disable integrity rules on the link between an order and a customer
// with use of a connection
CtSourceFile is Connection
CtLinkedFile is Connection
 
CtSourceFile.SetIntegrity(CtLinkedFile, CustomerOrder, ...
hCardinality + hOnUpdate + hOnDelete, False)

Enabling or disabling the management of an integrity constraint by specifying the connection of data file Hide the details

<Result> = <Source data file connection>.SetIntegrity([<Linked data file connection>, ] <Link description> [, <Integrity constraint>] , <Management mode>)
<Result>: Boolean
Former management mode of integrity (before the call to <Connection variable>.SetIntegrity):
  • True if the management of integrity was enabled,
  • False if the management of integrity was disabled.
<Source data file connection>: Connection variable
Name of the Connection variable that describes the connection to which the link source data file belongs.
<Linked data file connection>: Connection variable
Name of the Connection variable that describes the connection to which the linked file of the link belongs.
<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.
hCardinalityCheck the link cardinalities.
hOnUpdateIntegrity rule applied during a modification.
hOnDeleteIntegrity rule applied during a deletion.
<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.
Remark: Only <Source>.Add, <Source>.Modifie, <Source>.Delete, <Source>.Cross and <Source>.Write can generate an integrity error.

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.
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget iPhone/iPadUniversal Windows 10 AppWindows MobileJavaHFSQL Client/Server

In HFSQL Client/Server mode

Using the <Connection variable>.SetIntegrity(<Management>) syntax affects the behavior of all HFSQL servers (no matter whether the connection is opened before or after the call to <Connection variable>.SetIntegrity).
Using <Connection variable>.SetIntegrity by specifying the link name can be done if:
  • The link is described in the client analysis (or by HDescribeLink).
  • The two data files linked by this link are found on the same HFSQL server.
If <Connection variable>.SetIntegrity is called before the data files are in Client/Server mode (if <Source>.ChangeConnection is used for example), the server enables the integrity rule.
Rights are associated with the management of integrity on the database: hRightsManageIntegrity. An error occurs when the user tries not to comply with the integrity constraint (when using <Source>.Add, <Source>.Modifie, ...).
Component : wd250hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment