blk_gettext

Description

Server-side routine retrieves the text, image, sensitivity, or boundary portion of an incoming formatted bulk-copy row.

Syntax

CS_RETCODE blk_gettext(srvproc,blkdescp, rowp, bufp, bufsize, outlenp)
   SRV_PROC      *srvproc;
 CS_BLKDESC    *blkdescp;
 CS_BLK_ROW    *rowp;
 CS_BYTE           *bufp;
 CS_INT               bufsize;
 CS_INT             *outlenp;

Parameters

srvproc

A pointer to the SRV_PROC structure associated with the client sending the bulk-copy row. This structure 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 formatted bulk-copy row read from the client through 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.

bufp

A pointer to the application buffer in which Bulk-Library places the text, image, sensitivity, or boundary data.

bufsize

The size, in bytes, of the space pointed at by bufp.

outlenp

A pointer to a CS_INT variable, which is set to the number of bytes actually read by blk_gettext. It may be less than bufsize. To determine whether all of the text, image, sensitivity, or boundary part of the row has been read, check for a return code of CS_END_DATA. An *outlenp value that is less than bufsize does not necessarily indicate the end of a row. For example, it could indicate the end of a text, image, sensitivity, or boundary column that is not the last column in the row.

Returns

blk_gettext returns:

Returns

Indicates

CS_SUCCEED

The routine completed successfully.

CS_END_DATA

There are no more text, image, sensitivity, or boundary fields for the current incoming bulk-copy row. Call blk_getrow to get the next bulk-copy row.

CS_FAIL

The routine failed.

Usage

See also

blk_colval, blk_getrow, blk_gettext, blk_sendtext