Deletes the specified EDMgroup from the EDMdatabase.
An EDMgroup cannot be deleted from the EDMdatabase as long as an EDMuser is connected to the EDMserver with this EDMgroup account. Neither can it be deleted if the EDMgroup is the owner group of any object in the database. If an EDMuser has created repositories, models or instances in the database when connected with the specified EDMgroup account, the created objects will be owned by that EDMgroup. As long as such objects exists in the database, the EDMgroup may not be deleted. Use edmiChangeInstanceOwner to remove or to transfere ownership to another EDMgroup.
This command is only permitted for the superuser.
Related functions: edmiDeleteGroupBN, edmiCreateGroup, edmiUserToGroup, edmiUserFromGroup, edmiUserToGroupBN, edmiUserFromGroupBN.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiDeleteGroup(SdaiInstance groupId);
Arguments:
groupId |
A numeric groupID that uniquely identifies the edm_group instance to be deleted in the EDMdatabase. |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
SdaiGroup groupId;
...
rstat = edmiGetGroupBN("SUPERVISOR", &groupId);
if (rstat = edmiDeleteGroup (groupId)) {
/* Error in operation */
printf("\nError in edmiDeleteGroup: %s\n",
edmiGetErrorText(rstat));
goto error;
}
. . .