A server-side routine, copies descriptions of server table columns to the client, if required.
CS_RETCODE blk_srvinit(srvproc, blkdescp) SRV_PROC *srvproc; CS_BLKDESC *blkdescp;
A pointer to the SRV_PROC structure associated with the client receiving column descriptions. 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 structure containing information about bulk-copy data. This structure must have been previously allocated with a call to blk_alloc and initialized through a call to blk_init. This structure is used to correctly interpret incoming formatted bulk-copy rows.
blk_srvinit returns:
Returns |
Indicates |
---|---|
CS_SUCCEED |
The routine completed successfully. |
CS_FAIL |
The routine failed; no action was taken. |
blk_srvinit is a server-side routine that is useful in gateway applications.
This routine sends the current server table column descriptions in the CS_BLKDESC structure to the client, if the client’s TDS (Tabular Data Stream™) version is 5.0 or later.
This routine must be called from within a SRV_LANGUAGE event handler, in response to an “insert bulk” request from the client.
Once blk_srvinit has successfully returned descriptions to the client, the Open Server application’s SRV_BULK event handler can begin reading bulk data from the client. The event handler first calls blk_rowalloc, then calls blk_getrow and blk_sendrow in a loop to transfer the bulk-copy rows.
blk_init places the descriptions in the CS_BLKDESC structure, so the gateway application must call blk_init before calling blk_srvinit.