DB Library for C

DB Library for C


Saves any rows previously bulk copied from program variables and sent to Microsoft® SQL Server™ 2000 by bcp_sendrow.


DBINT bcp_batch ( PDBPROCESS dbproc );



Is the DBPROCESS structure that is the handle for a particular workstation or SQL Server 2000 process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.


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.

See Also