DCSIMG
Performance,C# - .NET Geek

.NET Geek

"It is upon the Trunk that a gentleman works" - Confucius

Browse by Tags

All Tags » Performance » C# (RSS)
Importing Large Xml Files to SQL Server Using SqlBulkCopy
Say you have a large Xml file that contains relatively tabular data that you want to import into SQL Server. There are several ways to go about this. Let’s look at a couple of options. Load the file into an XDocument. Extract elements from the DOM using Linq and then use ADO.Net to insert the data into the database. Load the data into a DataSet using ReadXml and save the data to the database Read through the data using an Xml reader and save each record to the database Options number 1 and 2 requires...