Created by Janne Vuoti, last modified on Mar 02, 2016
Bulk inserts data, using SqlBulkCopy.
| Parameter | Description | Example |
|---|
| Input data | The data to insert. See below for possible values and examples | |
| Table name | Name of table to bulk insert to. Will overwrite any value in the given DataTable. | |
| Sql input data type | | Type | Description | Example input data |
|---|
| XmlString | String that can be read to a DataSet using DataSet.ReadXml | @"<ROWSET><ROW><NameColumn>Jones</NameColumn></ROW></ROWSET>" | | XmlDocument | XmlDocument instance that can be read to a DataSet using DataSet.ReadXml | | | XDocument | XDocument instance that can be read to a DataSet using DataSet.ReadXml | | | JsonString | String that can be serialized as DataTable using Json.Net's DataTableConverter | {"Table":[{"NameColumn":"Jones"},{"NameColumn":"Smith"}]} | | JObject | JObject that can be serialized as DataSet using Json.Net's DataTableConverter | | | DataTable | Ready-made DataTable to insert | |
|
| Connection string | The connection string to use | "Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;" |
| Timeout seconds | The command timeout | 60 |