Bulk inserts data, using SqlBulkCopy.

Input parameters

ParameterDescriptionExample
Input dataThe data to insert. See below for possible values and examples 
Table nameName of table to bulk insert to. Will overwrite any value in the given DataTable. 
Sql input data type
TypeDescriptionExample input data
XmlStringString that can be read to a DataSet using DataSet.ReadXml@"<ROWSET><ROW><NameColumn>Jones</NameColumn></ROW></ROWSET>"
XmlDocumentXmlDocument instance that can be read to a DataSet using DataSet.ReadXml 
XDocumentXDocument instance that can be read to a DataSet using DataSet.ReadXml 
JsonStringString that can be serialized as DataTable using Json.Net's DataTableConverter{"Table":[{"NameColumn":"Jones"},{"NameColumn":"Smith"}]}
JObjectJObject that can be serialized as DataSet using Json.Net's DataTableConverter 
DataTableReady-made DataTable to insert 
Connection stringThe connection string to use"Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;"
Timeout secondsThe command timeout60