public void Insert() { BulkCopy.BulkCopyTimeout = BulkCopySettings.BulkCopyTimeout; BulkCopy.BatchSize = BulkCopySettings.BatchSize; BulkCopy.DestinationTableName = TableName; Connection.Open(); BulkCopy.WriteToServer(DataTable); Connection.Close(); }
public void WriteToServer() { if (Connection.State != ConnectionState.Open) { Connection.Open(); } BulkCopy.WriteToServer(InternalTable); }