blk_colval

Description

A server-side routine, obtains the column value from a formatted bulk-copy row.

Syntax

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;

Parameters

srvproc

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.

blkdescp

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.

rowp

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.

colnum

The column number of the column of interest. Column numbers start at 1.

valuep

A pointer to the application buffer in which the column value from the bulk-copy row is placed.

valuelen

The size, in bytes, of the buffer to which valuep points.

outlen

A pointer to a CS_INT variable. blk_colval sets *outlen to the size, in bytes, of the column data.

Returns

blk_colval returns:

Returns

Indicates

CS_SUCCEED

The routine completed successfully.

CS_FAIL

The routine failed.

Usage

See also

blk_getrow, blk_gettext