--- title: "bcp_done | Microsoft Docs" ms.custom: "" ms.date: "03/06/2017" ms.prod: "sql-server-2014" ms.reviewer: "" ms.technology: native-client ms.topic: "reference" api_name: - "bcp_done" api_location: - "sqlncli11.dll" topic_type: - "apiref" helpviewer_keywords: - "bcp_done function" ms.assetid: e59b3f16-5b59-40da-880f-f3edf657d1ee author: MightyPen ms.author: genemi manager: craigg --- # bcp_done Ends a bulk copy from program variables to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] performed with [bcp_sendrow](bcp-sendrow.md). ## Syntax ``` DBINT bcp_done ( HDBC hdbc ); ``` ## Arguments *hdbc* Is the bulk copy-enabled ODBC connection handle. ## Returns The number of rows permanently saved after the last call to [bcp_batch](bcp-batch.md) or -1 in case of error. ## Remarks Call **bcp_done** after the last call to [bcp_sendrow](bcp-sendrow.md) or [bcp_moretext](bcp-moretext.md). Failure to call **bcp_done** after copying all data results in errors. ## See Also [Bulk Copy Functions](sql-server-driver-extensions-bulk-copy-functions.md)