Deletes the specified repository from the EDMdatabase. Only the owner of the repository can delete it.
A repository must be empty and closed before it can be deleted.
The default repositories 'DictionaryRepository' , 'SystemRepository' and 'DataRepository' cannot be deleted.
Related functions: edmiDeleteRepositoryBN , edmiCreateRepository
Header:
#include "sdai.h"
Prototype:
EdmiError edmiDeleteRepository(SdaiRepository repositoryId);
Arguments:
repositoryId |
A numeric repositoryID that uniquely identifies the repository to be deleted. |
Returns:
A completion code of data type 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
SdaiRepository repId;
EdmiError rstat;
...
if (rstat = edmiDeleteRepository(repId)) {
/* Error in operation */
printf("\nError: %s in edmiDeleteRepository\n",
edmiGetErrorText(rstat));
goto error;
}
/* Specified repository is permanently deleted from database */