Deletes a repository in a remote EDMdatabase. Only the owner of the repository may delete it. Repositories must be emptied before they may be deleted.
The default repositories 'DictionaryRepository' , 'SystemRepository' and 'DataRepository' may not be deleted.
Related functions: edmiRemoteCreateRepository
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteDeleteRepository(SdaiServerContext serverContextId,
SdaiRepository repositoryId,
SdaiInvocationId *edmiInvocationId);
Arguments:
serverContextId |
Context identification, from edmiDefineServerContext |
repositoryId |
The numeric repositoriId that uniquely identifies the repository within a remote _EDMdatabase._ |
edmiInvocationId |
Currently not used. |
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;
SdaiServerContext myContext;
SdaiRepository repId;
/* Create Server Context */
rstat = edmiDefineServerContext("MyContext",
"Johnny", "Supervisor", "cf37ftr",
"TCP", "9090", "MyServerHost",
NULL, NULL, NULL, NULL, NULL, &myContext);
/* Get the repositoryId of MyRepository */
rstat = edmiRemoteGetRepository(myContext,
"MyRepository", &repId, NULL);
/* Delete MyRepository */
rstat = edmiRemoteDeleteRepository(myContext, repId, NULL);
. . .