A server-side routine, sends a formatted bulk-copy row obtained from blk_getrow.
CS_RETCODE blk_sendrow(blkdesc, row) CS_BLKDESC *blkdesc; CS_BLK_ROW *row;
A pointer to the CS_BLKDESC that is serving as a control block for the bulk-copy operation. blk_alloc allocates a CS_BLKDESC structure.
A pointer to a CS_BLK_ROW structure. The CS_BLK_ROW is a hidden structure that holds formatted bulk-copy rows sent from the client. A gateway application can fill in a CS_BLK_ROW structure with a formatted row by calling the server-side routine blk_getrow.
blk_sendrow returns:
Returns |
Indicates |
---|---|
CS_SUCCEED |
The routine completed successfully. |
CS_FAIL |
The routine failed. |
CS_BLK_HAS_TEXT |
The row contains one or more text, image, sensitivity, or boundary columns. The application must call blk_gettext and blk_sendtext to transfer the columns for this row before calling blk_getrow and blk_sendrow to transfer the next row. |
CS_PENDING |
Asynchronous network I/O is in effect. See the “Asynchronous Programming” topics page in the Open Client Client-Library/C Reference Manual. |
blk_sendrow is a server-side routine.
A gateway application uses blk_sendrow in conjunction with blk_getrow. Together, the two routines enable a gateway application to receive formatted bulk-copy rows from an Open Client application and send them on to Adaptive Server Enterprise.
blk_sendrow is a gateway-specific substitute for blk_rowxfer or blk_rowxfer_mult. An application can call blk_sendrow only after calling blk_getrow to retrieve a formatted row.
The sequence of calls in the gateway application is:
blk_getrow, to obtain a formatted bulk-copy row
blk_sendrow, to send the formatted row to Adaptive Server Enterprise
If blk_getrow returns CS_BLK_HAS_TEXT, the application must call the following routines in a loop, until blk_gettext returns CS_END_DATA:
blk_gettext, to pick up a chunk of text, image, sensitivity, or boundary data
blk_sendtext, to send a chunk of text, image, sensitivity, or boundary data
Only one blk_gettext/blk_sendtext loop is required, no matter how many text, image, sensitivity, or boundary columns are being transferred.