Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


 
Creates a persistent data repository in a remote EDMdatabase. A data repository is a container for data models. Any number of data repositories may be created in an EDMdatabase. Only EDMusers that have their 'creating_repository_permission' attribute set to sdaiTRUE may create repositories.
Related functions: edmiRemoteDeleteRepository, edmiRemoteOpenRepository, edmiRemoteCloseRepository
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteCreateRepository(SdaiServerContext serverContextId,                                     SdaiString        repositoryName,                                     SdaiInvocationId  *edmiInvocationId);
 
Arguments:

serverContextId

Context identification, from edmiDefineServerContext

repositoryName

The name to assign to the new repository in the remote _EDMdatabase{_}. Repository names are case sensitive and must be unique within the _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;
SdaiModel modId, copyModId;
SdaiRepository repositoryId;
/* Create Server Context */
rstat = edmiDefineServerContext("MyContext",
"Johnny", "Supervisor", "cf37ftr", 
"TCP", "9090", "MyServerHost", 
NULL, NULL, NULL, NULL, NULL, &myContext); 
 
/* Get the modelId of MyModel */
rstat = edmiRemoteGetModelBN(myContext, "DataRepository",
"MyModel", &modId, NULL); 
 
/* Create a repository for
containing my copy of MyModel */  
rstat = edmiRemoteCreateRepository(myContext,
"MyCopyRepository", NULL); 
 
/* Get the repositoryId */
rstat = edmiRemoteGetRepository(myContext,
"MyCopyRepository", &repositoryId, NULL); 
 
/* Copy MyModel to MyCopy in MyCopyRepository */
rstat = edmiRemoteCopyModel(myContext, modId,
repositoryId, "MyCopy", &copyModId, NULL); 
. . .
 

  • No labels