ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / HFSQL Client/Server functions
  • When are rights changed?
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Sets the rights granted to a user or group on an HFSQL Client/Server data file.
Remark: It is possible to find out the rights of a group or user on a Client/Server HFSQL data file using the HInfoFileRights function..
Example
// Copy the rights from one user to another 
sRights is string
sRights = HInfoFileRights("MyConnection", "Moore", hRightsRead + hRightsInsert, "MyDatabase", "MyFile.fic")
HModifyFileRights("MyConnection", "Doe", hRightsRead + hRightsInsert, ...
		sRights, "MyDatabase", "MyFile.FIC")
Syntax
<Result> = HModifyFileRights(<Connection> , <User/Group> , <Rights to modify> , <New values> , <Database> , <Data file>)
<Result>: Boolean
  • True if the rights have been modified,
  • False otherwise. HErrorInfo is used to identify the error.
No modification is performed if the new value is already assigned to the specified rights.
Note: An "Unknown user" or "Unknown group" error will be returned by function HErrorInfo if the current user does not have user view rights (constant hRightViewUser) and requests information about another user or group.
<Connection>: Character string or Connection variable
Connection for which the rights granted to a user or group of users should be modified. This connection corresponds to:
<User/Group>: Character string
Name of the user or group whose rights should be modified.
<Rights to modify>: Integer constant (or combination of constants)
List of rights to modify:
hRightsAutoModifRights to perform the automatic data file modification on a data file.
hRightsChangeLinkRights to change the integrity rules of a data file.
hRightsChangeOwnerRights to change the owner of an element.
hRightsChangeRightsRights to change rights.
hRightsDeleteRights to delete the records from a data file.
hRightsDeleteFileRights to delete a data file (HDeleteFile).
hRightsInsertRights to add records to a data file.
hRightsLockRights to lock the data files or the records of a data file.
hRightsMaintenanceRights to start a re-index operation or to perform statistical calculations on a data file.
hRightsManageDuplicateRights to enable and disable the management of duplicates.
hRightsReadRights to read the records of a data file.
hRightsUnmaskRights to unmask items in a data file.
hRightsUpdateRights to modify the records of a data file.
<New values>: Integer constants
List of new values for the modified rights. New values must be assigned to all the rights specified in <Rights to modify> (in the same order).
If a single value is indicated in this parameter, it will be assigned to all the rights specified in <Rights to modify>.
The possible values are as follows:
hAllowedThe relevant rights are granted to the user or group.
hForbiddenThe relevant rights are not granted to the user or group.
hInheritThe user will inherit the right granted to the group to which they belong.
<Database>: Character string
Name of the database containing the data file for which the rights must be modified.
  • If the database corresponds to the one defined in the connection, this parameter can correspond to an empty string ("").
  • A WLanguage error occurs if no database is defined in the connection and if this parameter corresponds to an empty string.
<Data file>: Character string
Name of the data file for which the rights should be modified.
Remarks

When are rights changed?

Rights are modified when HModifyFileRights is run. There is no need to restart the server to apply the new rights.
Component: wd300hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/15/2024

Send a report | Local help