A server-side routine, obtains the column value from a formatted bulk-copy row.
CS_RETCODE blk_colval(srvproc, blkdescp, rowp, colnum, valuep, valuelen, outlenp) SRV_PROC *srvproc; CS_BLKDESC *blkdescp; CS_BLK_ROW *rowp; CS_INT colnum; CS_VOID *valuep; CS_INT valuelen; CS_INT *outlen;
A pointer to the SRV_PROC structure associated with the client sending the bulk-copy row. It contains all the information that Server-Library uses to manage communications and data between the Open Server application and the client.
A pointer to a CS_BLKDESC structure containing information about bulk-copy data. This structure must have been previously allocated with a call to blk_alloc and initialized with a call to blk_init. This structure is used to interpret incoming formatted bulk-copy rows.
A pointer to the CS_BLK_ROW structure filled in by a prior call to blk_getrow.
The CS_BLK_ROW structure is a hidden structure that holds formatted bulk-copy rows sent from the client.
The column number of the column of interest. Column numbers start at 1.
A pointer to the application buffer in which the column value from the bulk-copy row is placed.
The size, in bytes, of the buffer to which valuep points.
A pointer to a CS_INT variable. blk_colval sets *outlen to the size, in bytes, of the column data.
blk_colval returns:
Returns |
Indicates |
---|---|
CS_SUCCEED |
The routine completed successfully. |
CS_FAIL |
The routine failed. |
blk_colval is a server-side routine. After getting the value of a specified column from a formatted bulk-copy row, it stores the value in an application buffer.
This routine performs no implicit data conversion. Use cs_convert to convert the data.
To examine the column value after a call to blk_colval, the application must know the column‘s datatype before making the call.
An Open Server application cannot use this routine to retrieve text, image, sensitivity, or boundary columns. Use blk_gettext to retrieve such columns.