ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

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
<Connection variable>.ModifyDatabaseRights (Function)
In french: <Variable Connexion>.ModifieDroitBaseDeDonnées
HFSQL Client/ServerAvailable only with this kind of connection
Sets the rights granted to a user or group for an HFSQL Client/Server database.
Remark: it is possible to find out the rights of a group or a user on an HFSQL Client/Server database using the <Connection variable>.InfoDatabaseRights function..
Example
// Describe the connection
MyConnection is Connection

// Copy the rights from one user to another
sRights is string
sRights = MyConnection.InfoDatabaseRights("Moore", hRightsRead + hRightsInsert, "MyDatabase")
MyConnection.ModifyDatabaseRights("Moore", hRightsRead + hRightsInsert, sRights, "MyDatabase")
Syntax
<Result> = <Connection>.ModifyDatabaseRights(<User or group> , <Rights to modify> , <New values> , <Database>)
<Result>: Boolean
  • True if 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 the HErrorInfo function if the current user does not have the user viewing right (constant hDroitVisualisationUtilisateur) and is requesting information about another user or group.
<Connection>: Connection variable
Name of the Connection variable that describes the connection for which the rights of a user or group of users must be modified.
<User or 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.
hRightsBackupRights to perform a backup.
hRightsChangeLinkRights to change the integrity rules of a data file.
hRightsChangeOwnerRights to change the owner of an element.
hRightsChangeRightsRights to change rights.
hRightsConnectionRights to connect to a server (encrypted or unencrypted connection).
hRightsCreateFileRights to create a data file (with <Source>.Creation).
hRightsCreateViewRights to create an SQL view or a materialized view.
hRightsDebugRights to debug stored procedures.
hRightsDeleteRights to delete the records from a data file.
hRightsDeleteDBRights to delete a database.
hRightsDeleteFileRights to delete a data file (<Connection variable>.DeleteFile).
hRightsDeleteViewRights to delete a view.
hRightsEncryptedConnectionRights to connect to a server (encrypted connection only).
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 reindex operation or to perform statistical calculations on a data file.
hRightsManageDuplicateRights to enable and disable the management of duplicates.
hRightsManageIntegrityRights to enable and disable the management of integrity.
hRightsManageProcedureRights to add, modify and delete the sets of procedures.
hRightsManageTriggerRights to add, enable and delete server triggers.
hRightsNoDatabaseAccessRights to prevent access to a database (<Connection variable>.NoDatabaseAccess and <Connection variable>.EndNoDatabaseAccess).
hRightsReadRights to read the records of a data file.
hRightsRunProcedureRights to run a stored procedure.
hRightsUnmaskRights to unmask items in the database files.
hRightsUpdateRights to modify the records of a data file.
<New values>: Integer constants
Lists the 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 right is undefined at this level for the user (or the group to which they belong). The HFSQL server uses the right defined at the top level for the user (or the group to which the user belongs). For the database, the HFSQL server uses the right defined for the user (or the group to which the user belongs) at server level.
<Database>: Character string
Name of the database for which the rights should be modified.
Remarks

When are rights changed?

Rights are modified when <Connection variable>.ModifyDatabaseRights is run. There is no need to restart the server to apply the new rights.
Duplicate and integrity management: The right error appears not when the management mode is changed, but when an attempt is made to violate the integrity constraint (or duplicates).
Component: wd300hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/13/2025

Send a report | Local help