Code Block | ||||
---|---|---|---|---|
| ||||
EdmiError edmiRemoteDeleteArchivedModel (SdaiServerContext serverContextId,
SdaiString remoteArchivedModelName,
SdaiInvocationId *edmiInvocationId);
|
Deletes an archived model from the EDMdatabase
...
and from the file system of the machine hosting the EDMserver
...
.
...
There is a maximum number of models that may coexist within an EDMdatabase
...
. Users that need to store great numbers of models may exceed this capacity. Therefore, models may be
...
temporarily archived, thereby releasing capacity in the EDMdatabase
...
. Models that are rarely used need not be permanently active in the EDMdatabase
...
.
...
When the EDMdatabase
...
is configured with EXTENSIVE_ACCESS_CHECKING, the EDMuser must have delete access to the archived model. Otherwise, write access is sufficient.
...
Arguments
...
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
SdaiString | remoteArchivedModelName | The name that was assigned to the archived model when it was created by edmiRemoteArchiveModel. |
SdaiInvocationId | edmiInvocationId | Not yet used. When the edmiInvocationId is specified unequal NULL, the actual operation will be asynchronous and a handle (identifier) of the call will be returned in the edmiInvocationId argument. |
...
Return Value
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
Example
...
Code Block | ||
---|---|---|
| ||
EdmiError rstat; SdaiServerContext myContext; SdaiModel modelId; SdaiArchivedModel archModId; SdaiInstance instId; SdaiBoolean updateAccepted = sdaiFALSE; /* Create Server Context */ rstat = edmiDefineServerContext("MyContext", |
...
"Johnny", "Supervisor", "cf37ftr", |
...
"TCP", "9090", "MyServerHost", |
...
NULL, NULL, NULL, NULL, NULL, &myContext); |
...
/* Activate the model */ |
...
rstat = edmiRemoteActivateModel(myContext, "MyArchivedModel", |
...
"DataRepository", "MyModel", |
...
KEEP_ARCHIVED_MODEL, &modelId, NULL); |
...
/* Update the population */ |
...
rstat = edmiRemoteCreateInstanceAndPutAttrsBN(myContext, |
...
"DataRepository", "MyModel", "FRIEND", 2, |
...
&instId, NULL, |
...
"FIRST_NAME", sdaiSTRING, "Lucy", |
...
"LAST_NAME", sdaiSTRING, "Schmidt"); |
...
/* Validate the update here */ |
...
if (updateAccepted == sdaiTRUE) { |
...
rstat = edmiRemoteDeleteArchivedModel(myContext, |
...
"MyArchivedModel", NULL); |
...
rstat = edmiRemoteArchiveModel(myContext, |
...
"DataRepository", "MyModel", |
...
"MyArchivedModel", 0, &archModId, NULL); |
...
printf("\nUpdate Accepted. Archiving updated model."); |
...
} else { |
...
rstat = edmiRemoteDeleteModel(myContext, |
...
"DataRepository", "MyModel", NULL); |
...
printf("\nUpdate Rejected. Updated model overruled."); |
...
}
. . . |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|