MemCom Reference Manual > MemCom C API Manual Pages > Database Manager Functions > mcDBputSet

Name

mcDBputSet — Write dataset to database

Synopsis

#include <memcom.h>

int mcDBputSet(int handle, const char* name, const char* type,
               mcSize size, void* data);

Description

mcDBputSet stores 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 mcDBputSetStr. If character arrays are stored with mcDBputSet the NULL-terminator of the array has to be controlled by the application program.

Parameters

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.

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.

See also

mcDBputSubset, mcDBputSetStr, mcDBputSubsetStr, mcDBputSetpos