Server-side routine retrieves and stores a formatted bulk-copy row.
CS_RETCODE blk_getrow(srvproc, blkdescp, rowp)
SRV_PROC *srvproc; CS_BLKDESC *blkdescp; CS_BLK_ROW *rowp;
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 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 a CS_BLK_ROW structure containing space for a formatted bulk-copy row. Space must have been previously allocated with blk_rowalloc.
The CS_BLK_ROW structure is a hidden structure that holds formatted bulk-copy rows sent from the client.
blk_getrow returns:
Returns |
Indicates |
---|---|
CS_SUCCEED |
The routine completed successfully. |
CS_END_DATA |
There are no more rows. |
CS_BLK_HAS_TEXT |
The row contains some text, image, sensitivity, or boundary data. Use blk_gettext to retrieve the text, image, sensitivity, or boundary data. Note that a return value of CS_BLK_HAS_TEXT implies a successful return, just like CS_SUCCEED. |
CS_FAIL |
The routine failed. |
blk_getrow is a server-side routine that is useful in gateway applications.
This routine copies the incoming formatted bulk-copy row into the CS_BLK_ROW structure to which rowp points. The row data is saved only until the next call to blk_getrow. The application must have previously allocated the space for the row using blk_rowalloc.
Once a row has been received through blk_getrow, the application may examine the contents of any fields (other than text, image, sensitivity, or boundary fields) using blk_colval.
Use blk_gettext to retrieve text, image, sensitivity, and boundary fields.
A bulk-copy row may subsequently be sent to another server using the blk_sendrow routine.
An application must read all incoming rows with blk_getrow, until there are no more rows.
Once blk_getrow returns CS_END_DATA, the application must drop the space allocated for the row using blk_rowdrop.