skip to main content
Interface Provider class : ipDCL
 

ipDCL

You must implement this method in your IP if it is to handle the SQL database control language (DCL) syntax for managing user privileges. This means that the OpenAccess SDK SQL engine calls this method 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 method should return true for the supported DCL operations.
Refer to "Implementing DCL Support" in Chapter 4 of the OpenAccess SDK SQL Engine Programmer's Guide for more information.
int ipDCL(
    long   hstmt,
    int    iType)
    xo_long piNumResRows)
Table 15. Parameters for ipDCL
Parameter
Type
Description
INPUT
hstmt
long
Statement handle of the currently active statement.
iType
int
Type of command requested.
*DAM_CREATE_USER - create an user.
*DAM_DROP_USER - drop an user.
*DAM_CREATE_ROLE - create a role.
*DAM_DROP_ROLE - drop a role.
*DAM_GRANT - grant a privilege.
*DAM_REVOKE - revoke a privilege.
piNumResRows
xo_long
The number of rows affected by this operation.
RETURN
int
DAM_SUCCESS - on successDAM_FAILURE - on failure