Send a row of data from program variables to Adaptive Server Enterprise.
RETCODE bcp_sendrow(dbproc) DBPROCESS *dbproc;
A pointer to the DBPROCESS structure that provides the connection for a particular front-end/Adaptive Server Enterprise process. It contains all the information that DB-Library uses to manage communications and data between the front end and Adaptive Server Enterprise.
SUCCEED or FAIL.
bcp_sendrow builds a row from program variables and sends it to Adaptive Server Enterprise.
Before calling bcp_sendrow, you must make calls to bcp_bind to specify the program variables to be used.
If bcp_bind is called with a type parameter of SYBTEXT or SYBIMAGE and a non-null varaddr parameter, bcp_sendrow will send the entire text or image data value, just as it does for all other datatypes. If, however, bcp_bind has a null varaddr parameter, bcp_sendrow will return control to the application immediately after all non-text or image columns are sent to Adaptive Server Enterprise. The application can then call bcp_moretext repeatedly to send the text and image columns to Adaptive Server Enterprise, a chunk at a time. For an example, see the bcp_moretext reference page.
After the last call to bcp_sendrow, you must call bcp_done to ensure proper internal cleanup.
When bcp_sendrow is used to bulk copy rows from program variables into Adaptive Server Enterprise tables, rows are permanently saved in Adaptive Server Enterprise only when the user calls bcp_batch or bcp_done.
The user may choose to call bcp_batch once every n rows, or when there is a lull between periods of incoming data (as in a telemetry application). Of course, the user may choose some other criteria or may decide not to call bcp_batch at all. If bcp_batch is never called, the rows are permanently saved in Adaptive Server Enterprise when bcp_done is called.
bcp_batch, bcp_bind, bcp_colfmt, bcp_collen, bcp_colptr, bcp_columns, bcp_control, bcp_done, bcp_exec, bcp_init, bcp_moretext