Saves any rows previously bulk copied from program variables and sent to Microsoft® SQL Server™ by bcp_sendrow.
DBINT bcp_batch ( PDBPROCESS dbproc );
The number of rows saved after the last call to bcp_batch, or -1 in case of error.
When an application uses bcp_bind and bcp_sendrow to bulk copy rows from program variables to SQL Server tables, the rows are permanently saved in SQL Server only when the program calls bcp_batch or bcp_done.
You can 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, you can choose some other criteria, or you can decide not to call bcp_batch at all. If bcp_batch is not called, the rows are permanently saved in SQL Server when bcp_done is called.
bcp_done | bcp_sendrow |