• When are rights changed?
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
<Connection variable>.ModifyViewRights (Function)
In french: <Variable Connexion>.ModifieDroitVue
HFSQL Client/ServerAvailable only with this kind of connection
Modifies the rights granted to a user or to a group on a SQL view or on a materialized view.
Remark: To find out the rights granted to a group or to a user on an SQL view or on a materialized view, use <Connection variable>.InfoViewRights.
// Describe the connection
MyConnection is Connection
// Copy the rights from a user to another one
sRights is string
sRights = MyConnection.InfoViewRights("Moore", ...
hRightsRead + hRightsInsert, "MyDatabase", "MyCustomerView")
MyConnection.ModifyViewRights("Smith", ...
hRightsRead + hRightsInsert, sRights, "MyDatabase", "MyCustomerView")
<Result> = <Connection>.ModifyViewRights(<User/Group> , <Rights to modify> , <New values> , <Database> , <View>)
<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.
Remark: HErrorInfo will return an "Unknown user" or "Unknown group" error 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.
<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/Group>: Character string
Name of the user or group whose rights must be modified.
<Rights to modify>: Integer constant (or combination of constants)
List of rights to modify:
hRightsChangeRightsRights to change rights.
hRightsDeleteRights to delete records from a view.
hRightsDeleteViewRights to delete a view.
hRightsInsertRights to add records to a view.
hRightsMaintenanceRights to start a re-index operation or a statistical calculation on a materialized view.
hRightsReadRights to read the records of a view.
hRightsUpdateRights to modify the records of a view.
<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:
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 from the value of the rights granted to the group to which he belongs.
<Database>: Character string
Name of the database containing the SQL view or the materialized view 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.
<View>: Character string
Name of the SQL view or materialized view for which the rights must be modified.

When are rights changed?

The change is effective as soon as <Connection variable>.ModifyViewRights is run. There is no need to restart the server to take the new rights into account.
Component: wd270hf.dll
Minimum version required
  • Version 25
This page is also available for…
Click [Add] to post a comment