edmiRemoteDeleteInstanceReferences
EdmiError edmiRemoteDeleteInstanceReferences(SdaiServerContext serverContextId, InstanceId instanceId, SdaiInvocationId *edmiInvocationId);
Deletes all external references to a given instance. Normally an instance cannot be deleted as long as there are other instances referring to it. This default behavior can be overruled by changing the system configuration settings.
Arguments
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
InstanceId | instanceId | A numeric instanceID that uniquely identifies the instance in the remote EDMdatabase for which to delete all external references. |
SdaiInvocationId | edmiInvocationId | Currently not used. |
Return Value
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.
Options
Example
EdmiError rstat; SdaiServerContext myContext; SdaiInteger index, nHits; SdaiQueryResult qexRes; SdaiInstance personId; /* Create Server Context */ rstat = edmiDefineServerContext("MyContext", "Johnny", "Supervisor", "cf37ftr", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &myContext); /* Get a persons instance Id from a unique primary key attribute 'PID' */ nHits = 1; index = 0; rstat = edmiRemoteSelectInstances(myContext, "DataRepository", "SocialRelations", "Person", "PID = '16126353127'", (ONLY_INSTANCE_IDS | SUBTYPES), NULL, NULL, NULL, &index, &nHits, &qexRes, NULL, NULL, NULL, NULL); if (!nHits) { printf("\nRequested pid not found."); goto err; } personId = qexRes->instanceIds[0]; /* Delete all references to personId */ rstat = edmiRemoteDeleteInstanceReferences(myContext, personId, NULL); /* Delete the instance it self */ rstat = edmiRemoteDeleteInstance(myContext, personId, 0, NULL); . . .
See also
Filter by label
There are no items with the selected labels at this time.