ImportData Method (SQL-DMO)

The ImportData method implements the bulk insert of data specified by the controlling BulkCopy object provided as an argument.

Applies To

Table Object

Syntax

object.ImportData( BulkCopy ) as Long

Part Description
object Expression that evaluates to an object in the Applies To list
BulkCopy Expression that evaluates to a BulkCopy object

Returns

The number of rows written to the Microsoft® SQL Server™ table.

Remarks

Set BulkCopy object properties to specify data insert parameters such as the source file and format of the source file, then use the ImportData method to execute the insert.

For more information about controlling a bulk-insert operation, see BulkCopy Object.

Prototype (C/C++)

HRESULT ImportData(
LPSQLDMOBULKCOPY Bcp,
LPLONG plRowsImported = NULL);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.