Ends a bulk copy from program variables into SQL Server performed with bcp_bind and bcp_sendrow.
DBINT bcp_done ( PDBPROCESS dbproc );
where
The number of rows permanently saved since the last call to bcp_batch, or -1 in case of error.
Call bcp_done after the last call to bcp_sendrow or bcp_moretext. Failure to call bcp_done after copying in all your data results in unpredictable errors.
bcp_batch, bcp_bind, bcp_moretext, bcp_sendrow