skip to main content
OpenAccess SDK SQL Engine core methods for .NET : Methods for .NET reference : dam_getFirstPrivilege
 

dam_getFirstPrivilege

This method is used to navigate the privilege list in the GRANT and REVOKE commands of the ipDCL method.
Refer to the "Privileges" section in Chapter 4 of OpenAccess SDK SQL Engine Programmer’s Guide for details on implementing this method.
int dam_getFirstPrivilege(
int64 hstmt,
out int piPrivilegeId,
StringBuilder szCatalog,
StringBuilder szRoleName)
 
Table 142: Parameters for dam_getFirstPrivilege 
Parameter
Type
Description
IN
 
 
hstmt
int64
The statement handle
piPrivilegeId
int
The type of the Privilege:
0 – indicates that the privilege is a Role
System Privilege
Object Privilege
System Privileges:
SQL_SYS_PRIV_CREATE_ANY_INDEX
SQL_SYS_PRIV_ALTER_ANY_INDEX
SQL_SYS_PRIV_DROP_ANY_INDEX
SQL_SYS_PRIV_GRANT_ANY_PRIVILEGE
System Privileges:
SQL_SYS_PRIV_CREATE_PROCEDURE
SQL_SYS_PRIV_CREATE_ANY_PROCEDURE
SQL_SYS_PRIV_DROP_ANY_PROCEDURE
SQL_SYS_PRIV_EXECUTE_ANY_PROCEDURE
SQL_SYS_PRIV_GRANT_ANY_ROLE
SQL_SYS_PRIV_CREATE_TABLE
SQL_SYS_PRIV_CREATE_ANY_TABLE
SQL_SYS_PRIV_ALTER_ANY_TABLE
SQL_SYS_PRIV_DROP_ANY_TABLE
SQL_SYS_PRIV_SELECT_ANY_TABLE
SQL_SYS_PRIV_INSERT_ANY_TABLE
SQL_SYS_PRIV_UPDATE_ANY_TABLE
SQL_SYS_PRIV_DELETE_ANY_TABLE
SQL_SYS_PRIV_CREATE_VIEW
 
OUT
 
 
piPrivilegeId (cont’d)
int
SQL_SYS_PRIV_CREATE_ANY_VIEW
SQL_SYS_PRIV_DROP_ANY_VIEW
SQL_SYS_PRIV_CREATE_USER
SQL_SYS_PRIV_CREATE_ANY_USER
SQL_SYS_PRIV_CREATE_ANY_VIEW
SQL_SYS_PRIV_DROP_ANY_VIEW
SQL_SYS_PRIV_CREATE_USER
SQL_SYS_PRIV_CREATE_ANY_USER
Object Privileges:
SQL_SYS_PRIV_DROP_ANY_USER
SQL_SYS_PRIV_CREATE_ROLE
SQL_SYS_PRIV_CREATE_ANY_ROLE
SQL_SYS_PRIV_DROP_ANY_ROLE
SQL_OBJ_PRIV_ALTER
SQL_OBJ_PRIV_DELETE
SQL_OBJ_PRIV_EXECUTE
SQL_OBJ_PRIV_INDEX
SQL_OBJ_PRIV_INSERT
SQL_OBJ_PRIV_SELECT
SQL_OBJ_PRIV_UPDATE
szCatalog
StringBuilder
The name of the Catalog. Applicable if Privilege Id is returned as 0.
szRoleName
StringBuilder
The name of the role
RETURN
 
 
 
int
DAM_SUCCESS – on success
DAM_FAILURE – on failure
DAM_NO_DATA_FOUND – on end of list

See also

ipDCL