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 Current »


 
Deletes a specified instance from the EDMdatabase. All instances in the same data model that is only referenced by the actual instance to delete, will also be deleted (deep delete).
This operation is only applicable to application instances.
The actual instance cannot normally be deleted if it is referenced by another instance, i.e. the actual instance has at least one relation with another instance. All references to the actual instance must be deleted before this operation can be successfully performed. The function edmiDeleteInstanceReferences can be used to delete all references to an instance, or the references can be deleted one by one by the appropriate operations.
The actual data model that locates the instance to be deleted must be open for write access, before this function can be successfully performed.
Related functions: sdaiDeleteInstance , sdaiCreateInstance , sdaiCreateInstanceBN , edmiCreateInstanceAndPutAttrs , edmiCreateInstanceAndPutAttrsBN ,edmiCreateScratchInstanceBN , edmiCreateScratchInstance , edmiCreateScratchInstanceAndPutAttrs , edmiCreateScratchInstanceAndPutAttrsBN
Header:
#include "sdai.h"
Prototype:
EdmiError edmiDeepDeleteInstance(SdaiAppInstance appInstance);
Arguments:

appInstance

A numeric instanceID that uniquely identifies the application instance to delete from the EDMdatabase.
The instanceID is defined by the sdaiCreateInstance or sdaiCreateInstanceBN function.

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;
SdaiAppInstance appInstance;
...
if (rstat = edmiDeepDeleteInstance appInstance)) {
/* Error in operation */ 
printf("\nError in edmiDeepDeleteInstance: %s\n", 
edmiGetErrorText(rstat)); 
goto error; 
}
. . .

  • No labels