Stored procedures
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
The stored procedures could use SQL statements internally to query the table, which is like an external user querying the table. Therefore, all mask configuration and unmasking privileges also apply to the table fields in a stored procedure to prevent unauthorized data access.
Example
The following example illustrates a stored procedure with a
In this example, the
SELECT statement
that retrieves a DDM-configured field.
|
pub.getCustnum stored procedure
retrieves CustNum, which is a DDM-configured field. The SQL engine
uses the unmasked value of CustNum to process the
WHERE condition in the query, regardless of your DDM
privileges. However, the SELECT list of the query returns the
unmasked value of CustNum for authorized users and the masked value
for unauthorized users.The following example illustrates a stored procedure with an
In this example, the
UPDATE statement
that updates a DDM-configured field.
|
pub.updCustnum stored procedure
updates CustNum, which is a DDM-configured field. The stored
procedure execution fails if you do not have unmasking privileges over
CustNum; otherwise, the procedure executes successfully.