edmiRemoteCreateInstanceAndPutAttrsBNEx
EdmiError edmiRemoteCreateInstanceAndPutAttrsBNEx(SdaiServerContext serverContextId, SdaiString remoteRepositoryName, SdaiString remoteModelName, SdaiString entityName, SdaiInteger attributes, SdaiString attributeNames[], SdaiSelect attributeValues[], SdaiOptions options, SdaiAppInstance *newInstanceId, SdaiInvocationId *edmiInvocationId);
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 function implements the same functionality as edmiRemoteCreateInstanceAndPutAttrsBN, but uses buffers in stead of a variable argument list to transfer attribute values. This operation is only applicable on data models.
Arguments
1 | Type | Name | Comment |
2 | SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
3 | SdaiString | 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. |
4 | SdaiString | remoteModelName | The name of the edmModel in which to create an instance. Model names are case sensitive. |
5 | SdaiString | 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. |
6 | SdaiInteger | attributes | An integer number that specifies the number of attribute values to put in the operation. |
7 | SdaiString | attributeNames | A string pointer buffer containing the all the attribute names to assign values to. |
8 | SdaiSelect | attributeValues | A buffer of pointers to tSdaiSelect structures. Each structure defines the type and value to be assigned to the attribute with the name given by the element of <attributeNames> with the same buffer position. |
9 | SdaiOptions | options | Currently not used. |
10 | SdaiAppInstance | newInstanceId | A variable that will receive a numeric instanceID that uniquely identifies the created instance in the remote EDMdatabase. |
11 | SdaiInvocationId | edmiInvocationId | Currently not used. |
Return Value
Options
Option | Comment |
Option name | Comment |
Example
EdmiError rstat; SdaiServerContext myContext; SdaiInstance instId; SdaiString name = "Lucy Scmidt"; SdaiString attrNames[4] = {"NAME", "AGE", "WEIGHT", "MARRIED"}; tSdaiSelect sel[4], *ps; SdaiSelect attrVals[4] = {&sel[0], &sel[1], &sel[2], &sel[3]}; /* Create Server Context */ rstat = edmiDefineServerContext("MyContext", "Johnny", "Supervisor", "cf37ftr", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &myContext); /* The NAME attribute */ ps = attrVals[0]; ps->nTypes = 0; ps->typeList = NULL; ps->type = sdaiSTRING; ps->value.stringVal = name; /* The AGE attribute */ ++ps; ps->nTypes = 0; ps->typeList = NULL; ps->type = sdaiINTEGER; ps->value.intVal = 32; /* The WEIGHT attribute */ ++ps; ps->nTypes = 0; ps->typeList = NULL; ps->type = sdaiREAL; ps->value.realVal = 59.5; /* The MARRIED attribute */ ++ps; ps->nTypes = 0; ps->typeList = NULL; ps->type = sdaiBOOLEAN; ps->value.boolVal = sdaiFALSE; /* Add person to the population */ rstat = edmiRemoteCreateInstanceAndPutAttrsBNEx(myContext, "DataRepository", "MySocialNetwork", "PERSON", 4, attrNames, attrVals, 0, &instId, NULL); . . .
See also
Filter by label
There are no items with the selected labels at this time.