The fastest way to insert an 10K*6 array to a SQL table RRS feed

  • Question

  • Hi,

    What's the fastest way to insert the data of an [10000,6] array to a SQL Server(2005) table?

    Wednesday, July 4, 2007 4:13 PM

All replies

  • The fastest way to get data into SQL Server is via the Bulk Copy mechanism. It's exposed in the BCP utility, SSIS, DTS and in ADO.NET (via SqlBulkCopy). These utilities need the data in a file-format (virtually any file format). One approach would be to unload the array into a delimited file and import the file. If the array is really a DataTable, then you can use the DataTableReader to expose a Datareader on the DataTable and use that to feed SqlBulkCopy in ADO.NET 2.0.



    Thursday, July 5, 2007 2:30 AM