mcATgetCell — Extract data from cell of array table
#include <memcom.h> void* mcATgetCell(int handle, const char* name, mcOff row, mcOff col, mcSSize *nelem);
mcATgetCell
extracts
nelem
data elements from the cell
row
, col
of the array table
name
residing on the database
handle
. If completed successfully, the function
returns a buffer containing nelem
data elements
of the type defined for the column col
. If the
cell is empty, nelem
is set to 0 and the function
returns NULL (this is not an error condition). In case of an error
NULL
is returned and nelem
contains the negative error code.
The buffer allocated by mcATgetCell
must
be freed with mcDBfree
.
handle
Database handle (input).
name
Name of a new dataset defining the array table (input).
row
Row of array table from where data is extracted
(input). row
must be greater or equal to
1 and less or equal to the number of defined rows.
col
Column number (not name) of array table from where
data is extracted (input). col
must be
greater or equal to 1 and less or equal to the number of
defined columns.
nelem
Number of data elements extracted from array table or
error status (output). If the cell is empty,
nelem
is set to 0 and the function
returns NULL (this is not an error condition). If an error
occurs, nelem
is set to -1 and the
function returns NULL.