sdaiCreateADB
Creates an ADB container to be used for subsequent get and put operations. The created ADB container will be filled with the data value specified in the arguments of the function. Typed data value cannot be transferred in an ADB container.
An ADB container can be used to get and put all EDMinterface data types except the sdaiADB data type, i.e., an ADB container cannot contain another ADB as the data value.
All created ADB containers will be deleted when the actual _EDMserver_ session is closed, i.e. the ADB containers are not persistent in an EDMdatabase.
See related functions: sdaiCreateEmptyADB , sdaiDeleteADB , sdaiGetADBType , sdaiGetADBValue , sdaiPutADBValue
Header:
#include "sdai.h"
Prototype:
SdaiADB sdaiCreateADB(SdaiPrimitiveType valueType,
...);
Arguments:
valueType |
Specifies the primitive type of the data value to write into the created ADB container. |
value |
The actual data value to write into the created ADB container. The value must be of the primitive type specified in the <valueType> argument. |
Returns:
A numeric adbID that uniquely identifies the new created ADB container for subsequent EDMinterface operations.
adbID != 0 : operation successfully performed.
adbID = 0 : operation failed, use sdaiErrorQuery function to get error reason.
Example:
SdaiADB adbId;
...
adbId = sdaiCreateADB(sdaiSTRING, "mystring");
if (! adbId) {
/* Error in operation */
printf("\nError: %s in sdaiCreateADB \n",
edmiGetErrorText(sdaiErrorQuery()));
goto error;
}
. . .