mcDBputSubset — Write sub-set to database
#include <memcom.h> int mcDBputSubset(int handle, const char* name, const char* type, mcOff subset, mcSize size, void* data);
mcDBputSubset
stores a sub-set of a
dataset to a MemCom database. If
completed successfully, the function returns 0. Otherwise, a
negative value indicating the MemCom
error number is returned. Note that it is safer to store data of
type K
, i.e character arrays, by means of the
function mcDBputSubsetStr
.
If character arrays are stored with mcDBputSubset
the NULL-terminator of the array has to be controlled by the
application program.
handle
Database handle (input).
name
Dataset name (input).
type
Data type of data to be stored (input).
type
must correspond to the effective
data type of data
.
subset
Index of sub-set to be stored (input).
size
Number of data elements to be written (input).
data
Pointer to the array to be stored (input). Note that this pointer must not be constant, since MemCom may perform conversion in-place. However, the data in the buffer is always reset to the original state before the function returns.