Skip to content

Latest commit

 

History

History
48 lines (38 loc) · 4.35 KB

File metadata and controls

48 lines (38 loc) · 4.35 KB
title IBCPSession (OLE DB) | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql
ms.prod_service database-engine, sql-database, sql-data-warehouse, pdw
ms.reviewer
ms.technology native-client
ms.topic reference
apitype COM
helpviewer_keywords
IBCPSession interface
ms.assetid 00d0311f-8b71-4ad6-824d-0e89119347a3
author markingmyname
ms.author maghan
monikerRange >=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current

IBCPSession (OLE DB)

[!INCLUDEappliesto-ss-asdb-asdw-pdw-md]

The IBCPSession interface exposes support for [!INCLUDEssNoVersion] file-based bulk copy operations. The IBCPSession interface is exposed in the [!INCLUDEssNoVersion] Native Client OLE DB provider under the same level as Sessions. In the [!INCLUDEssNoVersion] Native Client OLE DB provider, data source objects are factories for Session objects, and bulk copy operations are specified in the connection property SSPROP_ENABLEBULKCOPY. In addition, the SSPROP_ENABLEFASTLOAD property should be set to true.

Calling the IDBCreateSession::CreateSession method will then result in the creation of a BulkCopySession object. All the file-based bulk copy methods exposed through the IBCPSession object are then callable with nearly similar signatures on this IBCPSession object's IBCPSession interface.

Note

The [!INCLUDEssNoVersion] Native Client OLE DB provider supports memory-based bulk copy operations through the IRowsetFastLoad interface.

For more information about using the [!INCLUDEssNoVersion] Native Client OLE DB provider for bulk copy operations, see Performing Bulk Copy Operations.

For a sample showing how to use the IBCPSession interface, see IBCPSession::BCPDone (OLE DB).

In This Section

Method Description
IBCPSession::BCPColFmt (OLE DB) Creates a binding between program variables and [!INCLUDEssNoVersion] columns.
IBCPSession::BCPColumns (OLE DB) Sets the number of fields that are to be bound to the columns in a [!INCLUDEssNoVersion] table.
IBCPSession::BCPControl (OLE DB) Sets the options for a bulk copy operation.
IBCPSession::BCPDone (OLE DB) Commits the remaining rows to be sent to [!INCLUDEssNoVersion].
IBCPSession::BCPExec (OLE DB) Performs the bulk copy operation.
IBCPSession::BCPInit (OLE DB) Initializes the bulk copy structure, performs some error checking, verifies that the data and format file names are correct, and then opens them.
IBCPSession::BCPReadFmt (OLE DB) Reads format information for each column from the format file.
IBCPSession::BCPWriteFmt (OLE DB) Writes format information for each column to the format file.

See Also

Interfaces (OLE DB)