EdmiError edmiRemoteActivateModel (SdaiServerContext serverContextId, SdaiString remoteArchivedModelName, SdaiRepository remoteRepositoryName, SdaiString remoteModelName, SdaiOptions options, SdaiModel *modelId SdaiInvocationId *edmiInvocationId);
<Description>
Arguments
Type | Name | Comment |
sdaiString | resultString | Comment |
Return Value
Options
Option | Comment |
Option name | Comment |
Example
See also
Filter by label
There are no items with the selected labels at this time.
This operation creates an entity instance in an edmModel in a remote EDMdatabase and in the same operation, optionally puts values into any number of its attributes.
This operation is only applicable on data models.
Related functions: edmiRemoteCreateInstanceAndPutAttrs, edmiRemoteCreateInstanceAndPutAttrsBNEx, edmiRemoteCreateInstanceAndPutAttrsEx
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteCreateInstanceAndPutAttrsBN(SdaiServerContext serverContextId,
SdaiString remoteRepositoryName,
SdaiString remoteModelName,
SdaiString entityName,
SdaiInteger attributes,
SdaiAppInstance *newInstanceId,
SdaiInvocationId *edmiInvocationId,
/* [SdaiString attributeName, SdaiPrimitiveType valueType, SdaiVoid value] */
...);
Arguments:
serverContextId | Context identification, from edmiDefineServerContext |
remoteRepositoryName | The name of the edmRepository in the remote EDMdatabase that contains the edmModel in which to create an instance. Repository names are case sensitive. |
remoteModelName | The name of the edmModel in which to create an instance. Model names are case sensitive. |
entityName | Name of the entity that defines the instance type to create. Entity names are case insensitive. The entity must be defined in the underlying schema of the edmModel specified by the <remoteModelName> argument. |
attributes | The number of attribute values given in the variable argument list <values>. |
newInstanceId | Variable that will receive the numeric instanceID that uniquely identifies the created instance in the remote EDMdatabase |
edmiInvocationId | Currently not used. |
values | For each attribute value to assign, the three following arguments in the following order must be specified:
|
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;
SdaiInstance instId;
/* Create Server Context */
rstat = edmiDefineServerContext("MyContext",
"Johnny", "Supervisor", "cf37ftr",
"TCP", "9090", "MyServerHost",
NULL, NULL, NULL, NULL, NULL, &myContext);
rstat = edmiRemoteCreateInstanceAndPutAttrsBN(myContext,
"DataRepository", "MySocialNetwork",
"PERSON", 4, &instId, NULL,
"NAME", sdaiSTRING, "Lucy Schmidt",
"AGE", sdaiINTEGER, 32,
"WEIGHT", sdaiREAL, 59.5,
"MARRIED", sdaiBOOLEAN, sdaiFALSE);
. . .