Assembly: System.Data (in system.data.dll)
/** @property */ public int get_BulkCopyTimeout () /** @property */ public void set_BulkCopyTimeout (int value)
public function get BulkCopyTimeout () : int public function set BulkCopyTimeout (value : int)
Property ValueThe integer value of the BulkCopyTimeout property.
The following console application demonstrates how to modify the default time-out setting of 30 seconds when bulk loading data.
In this example, the source data is first read from a SQL Server table to a SqlDataReader instance. The source data does not have to be located on SQL Server; you can use any data source that can be read to an IDataReader or loaded to a DataTable.
This sample will not run unless you have created the work tables as described in Creating Tables for the Bulk Copy Examples. This code is provided to demonstrate the syntax for using SqlBulkCopy only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL INSERT … SELECT statement to copy the data.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.