Provides access to members for granting and revoking privileges to database users.
Members
Name | Description | |
---|---|---|
Grant | Grants privileges for the database user. | |
Revoke | Revokes privileges for the database user. | |
SQLPrivileges | The database privileges. |
ISQLPrivilege.Grant Method
Grants privileges for the database user.
Public Sub Grant ( _
ByVal UserName As String, _
ByVal privileges As Integer, _
ByVal withGrant As Boolean _
)
public void Grant (
string UserName,
int privileges,
bool withGrant
);
Description
The esriSQLPrivilege enumeration defines privieges that that can be granted with ISQLPrivilege:
Enumeration esriSQLPrivilege | SQL Privileges |
---|---|
1 - esriSelectPrivilege | Select |
2 - esriUpdatePrivilege | Update |
4 - esriInsertPrivilege | Insert |
8 - esriDeletePrivilege | Delete |
The values may be bitwise OR'd together if more than one privilege applies (note that this is equal to summing the integer values). The dataset name could be a feature dataset, in which case the user would receive privileges on all the contents of the feature dataset.
If TRUE, the withGrant parameter denotes that the user may grant access privileges to other users.
ISQLPrivilege.Revoke Method
Revokes privileges for the database user.
Public Sub Revoke ( _
ByVal UserName As String, _
ByVal privileges As Integer _
)
public void Revoke (
string UserName,
int privileges
);
Remarks
The esriSQLPrivilege enumeration defines privieges that that can be revoked with ISQLPrivilege:
Enumeration esriSQLPrivilege | SQL Privileges |
---|---|
1 - esriSelectPrivilege | Select |
2 - esriUpdatePrivilege | Update |
4 - esriInsertPrivilege | Insert |
8 - esriDeletePrivilege | Delete |
The values may be bitwise OR'd together if more than one priviege applies (note that this is equal to summing the integer values). The dataset name could be a feature dataset, in which case the user would no longer have privileges on the contents of the feature dataset.
ISQLPrivilege.SQLPrivileges Property
The database privileges.
Public ReadOnly Property SQLPrivileges As Integer
public int SQLPrivileges {get;}
Classes that implement ISQLPrivilege
Classes | Description |
---|---|
FeatureDatasetName | Esri Feature Dataset Name object. |
ObjectClassName | Esri Object Class Name object. |
RelationshipClassName | Esri Relationship Class Name object. |
TableName | Esri Table Name object. |
Remarks
The ISQLPrivilege optional interface provides information about the permissions you have on a database object and also the ability to change the permissions for other users. It only applies to those datasets that are stored within an ArcSDE geodatabase. It applies to feature datasets, feature classes, tables, relationship classes, raster datasets, and raster catalogs. ISQLPrivilege cannot be used on datasets contained within a feature dataset, as permissions are managed at the feature dataset level.
The esriSQLPrivilege enumeration defines values that can be used with ISQLPrivilege:
Enumeration esriSQLPrivilege | SQL Privileges |
---|---|
1 - esriSelectPrivilege | Select |
2 - esriUpdatePrivilege | Update |
4 - esriInsertPrivilege | Insert |
8 - esriDeletePrivilege | Delete |
The values may be bitwise OR'd together if more than one privilege applies (note that this is equal to summing the integer values). For example, if the SQLPrivileges property returns a value of 9, this would mean that you have select and delete permission on the dataset, but not insert or update. A value of 15 indicates full privileges.
The last parameter on Grant is for specifying whether or not the user will have the ability to grant privileges to other users.
Address locators only support esriSelectPrivilege.