This document is archived and information here might be outdated.  Recommended version.


ISQLPrivilege.Grant Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabase)  

ISQLPrivilege.Grant Method

Grants privileges for the database user.

[Visual Basic .NET]
Public Sub Grant ( _
    ByVal UserName As String, _
    ByVal privileges As Integer, _
    ByVal withGrant As Boolean _
)
[C#]
public void Grant (
    string UserName,
    int privileges,
    bool withGrant
);
[C++]
HRESULT Grant(
  BSTR UserName,
  long privileges,
  VARIANT_BOOL withGrant
);
[C++]

Parameters UserName [in] UserName is a parameter of type BSTR privileges [in] privileges is a parameter of type long withGrant [in] withGrant is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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.

See Also

ISQLPrivilege Interface

.NET Related Topics

Geodatabase