edmiDeleteArchivedModel


 

EdmiError edmiDeleteArchivedModel(SdaiString archivedModelName);

Deletes an archived model.  There is a maximum number of models that may coexist within an EDMdatabase. Users that need to store great numbers of models may exceed this capacity. Therefore, models may be temporarely archived, thereby releasing capacity in the EDMdatabase. Models that are rarely used need not be permanently active in the EDMdatabase. When the EDMdatabase is configured with EXTENSIVE_ACCESS_CHECKING, the EDMuser must have delete access to the archived model. Otherwise, write access is sufficient.

Arguments


TypeNameComment
SdaiString

ArchivedModelName

The name of the archived model to delete. Model names are case sensitive.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

Options


Example


 

 EdmiError rstat;
 SdaiInteger index = 0;
 SdaiInteger nHits = 1;
 SdaiModel modId;
 SdaiArchivedModel arcModId;
 SdaiGroup myGroupId, ownerGroupId;
 SdaiUser myUserId, ownerId;
 SdaiUnsignedInt prot;
 SdaiBoolean gotAccess = sdaiFALSE;
 SdaiInstance *admin;
 SdaiVoid accFor;
 ...
 /* Get archived model Id */
 edmiGetModelBN("SystemRepository","ExpressDataManager", &modId);
 edmiSelectInstancesBN(modId, "edm_archived_model", "NAME='myArcModel'",
 0, sizeof(SdaiInstance), &index, &nHits, &arcModId);
 if (!nHits) {
 printf("\nWarning! No archived model with that name");
 } else {
 /* Check for delete access */
 edmiGetInstanceAccessRights(arcModId, &ownerId, &ownerGroupId,
 &prot, &admin, &accFor);
 if (ownerId == myUserId) {
 gotAccess = prot & OWNER_DELETE;
 } else if (ownerGroupId == myGroupId) {
 gotAccess = prot & GROUP_DELETE;
 } else (
 gotAccess = prot & PUBLIC_DELETE;
 }
 if (gotAccess && (rstat = edmiDeleteArchivedModel("myArcModel"))) {
 printf("\ERROR %d in edmiDeleteArchivedModel: %s", rstat,
 edmiGetErrorText(rstat)); 
 } else {
 printf("\nArchived model was successfully deleted");
 }
 }

 

See also

Filter by label

There are no items with the selected labels at this time.

Â