skip to main content
OpenAccess SDK SQL Engine core methods for Java : Exchanging data : dam_getNextPrivilege
 

dam_getNextPrivilege

This method is used to navigate the privilege list in the GRANT and REVOKE commands. It is used in the ipDCL method.
int dam_getNextPrivilege(
    long         hstmt,
    xo_int       piPrivilegeId,
    StringBuffer szCatalog,
    StringBuffer szRoleName)
Table 201. Parameters for dam_getNextPrivilege
Parameter
Type
Description
INPUT
hstmt
long
The statement handle.
OUTPUT
piPrivilegeId
xo_int
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
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
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
szCatalog
StringBuffer
The name of the Catalog. Applicable if Privilege Id is returned as 0.
szRoleName
StringBuffer
The name of the role.
RETURN
int
DAM_SUCCESS - on success
DAM_FAILURE - on failure
DAM_NO_DATA_FOUND - on end of list