skip to main content
Interface Provider class : ipPrivilege
 

ipPrivilege

You must implement this method in your IP if it is to support privileges. This method is called before the OpenAccess SDK SQL engine processes any commands. It passes in the user name, the operation code, and the fully qualified object name. Your method should return TRUE if the specified user is allowed to perform the requested operation on the object. ipGetSupport should return true for IP_SUPPORT_PRIVILEGE.
Refer to "Implementing Privilege Support" in Chapter 4 of the DataDirect OpenAccess SDK SQL Engine Programmer's Guide for more information.
int ipPrivilege(
    int    iCmdType,
    String pcUserName,
    String pcQualifier,
    String pcOwner,
    String pcName)
Table 26. Parameters for ipPrivilege
Parameter
Type
Description
INPUT
iCmdType
int
Type of DCL operation.
pcUserName
String
Name of the connected user.
pcQualifier
String
Name of the database in which the table falls. Can be used to distribute tables into physically different databases.
pcOwner
String
The owner of this object.
pcName
String
The name of this object.
RETURN
int
DAM_TRUE - the SQL engine can perform the requested operation.
DAM_FALSE - the operation is not authorized.
When calling ipPrivilege, the OpenAccess SDK SQL engine passes the full object information (qualifier.owner.name) for the following commands:
*CREATE TABLE
*ALTER TABLE
*DROP TABLE
*CREATE VIEW
*DROP VIEW

See also

*ipGetSupport