The following example shows how to delete a user using the DeleteUser() method:
USING OpenEdge.DataAdmin.*.

VAR DataAdminService oDAS. VAR IUser oUser.
VAR LOGICAL lResult.

ASSIGN oDAS = NEW DataAdminService(LDBNAME("DICTDB")).
lResult = oDAS:DeleteUser("PSCUser").

DELETE OBJECT oDAS.
Note:
  • When executing this example code, if you do not have the necessary privileges to delete the user, an error occurs.
  • After successful execution of the example code, the user is deleted, and the granted roles are disassociated from the deleted user.