skip to main content
OpenAccess SDK SQL Engine Core Functions API : Function Reference : dam_getNextPrivilege/dam_getNextPrivilegeW
 

dam_getNextPrivilege/dam_getNextPrivilegeW

This function is used to navigate the privilege list in the GRANT and REVOKE commands of the IP DCL function. The dam_getNextPrivilegeW function is used for Unicode.
int dam_getNextPrivilege(
    DAM_HSTMT hstmt,
    int * piPrivId,
    char * pcCatalog,
    char * pcRoleName)

int dam_getNextPrivilegeW(
    DAM_HSTMT hstmt,
    int * piPrivId,
    OAWCHAR * pcCatalog,
    OAWCHAR * pcPrivRoleName)
Table 139. Parameters for dam_getNextPrivilege/dam_getNextPrivilegeW
Parameter
Type
Description
IN
hstmt
DAM_HSTMT
The statement handle.
OUT
piPrivId
int *
The type of the Privilege:
*0 - indicates that the privilege is a Role.
*System Privilege
*Object Privilege
int *
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
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
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_DROP_ANY_USER
SQL_SYS_PRIV_CREATE_ROLE
SQL_SYS_PRIV_CREATE_ANY_ROLE
SQL_SYS_PRIV_DROP_ANY_ROLE
piPrivId
int *
Object Privileges:
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
SQL_OBJ_PRIV_ALL
pcCatalog
char *
OAWCHAR *
The name of the Catalog. Applicable if Privilege Id is returned as 0. Pass in a buffer of 128 characters.
pcRoleName
char *
OAWCHAR *
The name of the role. Pass in a buffer of 128 characters.
RETURN
int
DAM_SUCCESS - on success
DAM_FAILURE - on failure
DAM_NO_DATA_FOUND - on end of list and no data was retrieved.