Try OpenEdge Now
skip to main content
Programming Interfaces
Database Administration Entity Interface Reference : IAdministrator interface : IAdministrator examples
 

IAdministrator examples

The following code updates the Security Administrators for the database:
define variable admin as IAdministrator no-undo.

admin = service:GetAdministrator( ).
admin:Administrators = "xxx@*".
service:UpdateAdministrator(admin).
The GetAdministrator( ) method in the service has no parameter and returns a single object that applies to the entire database. The pattern, "xxx@*", is a user id pattern, which can be formed following the rules of an ID pattern list as defined for the ABL built-in CAN-DO function. For more information, see the CAN-DO function entry in OpenEdge Development: ABL Reference, and see the sections on user ID patterns and ABL permissions checking in OpenEdge Getting Started: Identity Management.
See also:
*IDataAdminElementinterface