skip to main content
Interface Provider API : Reference : OAIP_dcl
 

OAIP_dcl

This function must be implemented by the IP, if the IP is to handle the SQL database control language (DCL) syntax for managing user privileges. This means that the OpenAccess SDK SQL engine calls this function anytime it needs to manipulate a system or object privilege (for example GRANT CREATE TABLE TO JOHN) or it needs to delete a privilege (for example REVOKE DROP ANY INDEX FROM JOHN). The GETSUPPORT function should return true for the supported DCL operations.
Refer to "Implementing DCL Support" in the OpenAccess SDK SQL Engine Programmer's Guide for more information.
int OAIP_dcl(
    IP_HDBC hdbc,
    DAM_HSTMT hstmt,
    int iType
    int64 * piNumResRows)
Table 4. Parameters for OAIP_dcl
Parameter
Type
Description
IN
hdbc
IP_HDBC
The connection handle as defined by the IP.
hstmt
DAM_HSTMT
The statement handle of the currently active statement.
iType
int
Type of command requested:
DAM_CREATE_USER - create a user.
DAM_DROP_USER - drop a user.
DAM_CREATE_ROLE - create a role.
DAM_DROP_ROLE - drop a role.
DAM_GRANT - grant a privilege.
DAM_REVOKE - revoke a privilege.
OUT
piNumResRows
int64 *
The number of rows affected by this operation.
RETURN
int
DAM_SUCCESS - on success
DAM_FAILURE - on failure