PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

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
HInfoDatabaseRights (Function)
In French: HInfoDroitBaseDeDonnées
HFSQL Client/ServerAvailable only with this kind of connection
Allows you to find out the rights granted to a user or to a group on a database.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the 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.
Note: 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.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
New in version 22
Android Widget This function is now available in Android Widget mode.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
TheRights is string
ARight is string
// Retrieves the read/add rights granted to the user named Moore
// on MyDatabase
TheRights = HInfoDatabaseRights("CNT", "Smith", ...
hRightsRead + hRightsInsert, "MyDatabase")
ARight = ExtractString(TheRights, firstRank, TAB)
WHILE ARight <> EOT
SWITCH ARight
CASE hAllowed
...
CASE hForbidden
...
CASE hInherit
...
END    
ARight = ExtractString(TheRights, nextRank, TAB)
END
Syntax
<Result> = HInfoDatabaseRights(<Connection Name> , <Name of User/Group> , <Rights> , <Database> [, <Display Mode of Result>])
<Result>: Character string
  • Requested information,
  • Empty string ("") if an error occurred.
  • "Unknown user" or "Unknown group" if the current user does not have the rights to see the users (hRightsSeeUser constant) and if he wants to get information about another user or another group.
The requested information depend according to the <Display Mode of Result> parameter:
  • In hDefault mode, <Result> is a list of values separated by tabulations (TAB).
    <Value of Rights 1> + TAB + ... + TAB + <Value of Rights N>
    where <Value of Rights> corresponds to the value of the rights requested by the <Rights> parameter. Each value found in this list can correspond to one of the following constants:
    hAllowedThe relevant rights are granted to the user or to the group.
    hForbiddenThe relevant rights are not granted to the user or to the group.
    hInheritThe user belongs to at least one group to which the relevant rights was granted.
    This constant is returned only if the display mode is not set to hEffective.
  • In hDetails mode, <Result> is a list of values with the following format::
    <Relevant Rights 1> + TAB + <Value of Rights1> + CR + ...
    <Relevant Rights N> + TAB + <Value of Rights N> + CR

    where:
    • <Relevant Rights> corresponds to one of the constants used in the <Rights> parameter.
    • <Value of Rights> corresponds to one of the constants:
      hAllowedThe relevant rights are granted to the user or to the group.
      hForbiddenThe relevant rights are not granted to the user or to the group.
      hInheritThe user belongs to at least one group to which the relevant rights was granted.
      This constant is returned only if the display mode is not set to hEffective.
<Connection Name>: Character string (with or without quotes)
Name of the connection for which the rights granted to a user or to a group of users are requested. This connection was defined in the data model editor, or by HDescribeConnection or HOpenConnection.
<Name of User/Group>: Character string (with quotes)
Name of the user or name of the group whose rights are requested.
<Rights>: Integer constant (or combination of constants)
List of rights to find:
hRightsInsertRights to add new records into a data file.
hRightsLockRights to lock the data files or the records of a data file.
hRightsChangeRightsRights to change the rights.
hRightsChangeLinkRights to modify the integrity rules on a data file.
hRightsChangeOwnerRights to modify the owner of an element.
hRightsConnectionRights to connect to a server (encrypted or unencrypted connection).
hRightsEncryptedConnectionRights to connect to a server (encrypted connection only).
hRightsCreateFileRights to create a data file (with HCreation).
Versions 20 and later
hRightsCreateView
New in version 20
hRightsCreateView
hRightsCreateView
Rights to create a view.
hRightsDebugRights to debug the stored procedures.
hRightsRunProcedureRights to run a stored procedure.
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, modify and delete the server triggers.
hRightsNoDatabaseAccessRights to forbid the access to a database (HNoDatabaseAccess and HEndNoDatabaseAccess)
hRightsReadRights to read the records of a data file.
hRightsMaintenanceRights to start a re-index operation or to perform statistical calculations on a data file.
hRightsAutoModifRights to perform an automatic modification on a data file.
hRightsUpdateRights to modify the records of a data file.
hRightsBackupRights to perform a backup
hRightsDeleteRights to delete the records from a data file.
hRightsDeleteDBRights to delete a database.
hRightsDeleteFileRights to delete a data file (HDeleteFile).
Versions 20 and later
hRightsDeleteView
New in version 20
hRightsDeleteView
hRightsDeleteView
Rights to delete a view.
hRightsAllList of all the rights
We recommend that you use this constant in hDetails or hEffective + hDetails display mode.
<Database>: Character string (with quotes)
Name of the database for which the rights are requested.
<Display Mode of Result>: Optional Integer constant
Mode for displaying the result:
hDefault
(Default value)
The rights returned do not take the inherited rights into account (rights granted to the groups to which the user belongs).
If no rights were defined, the value will be set to hInherit.
<Result> contains the values of the requested rights (in the same order).
hDetailsSame as hDefault.
<Result> contains the rights and its value.
hEffectiveThe rights returned correspond to the rights that will be actually granted to the user or to the group on the database. The inherited rights are taken into account (rights granted to the groups to which the user belongs for example).
hEffective + hDetailsSame as hEffective.
<Result> contains the rights and its value.
Remarks
To modify the rights granted to a user or to a group on a database, use HModifyDatabaseRights.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Windows Mobile wp230hf.dll
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment