I have an array containing a list of file paths that I want to insert into an SQL database.
string[] filePaths = Directory.GetFiles(@"C:\Test Folder");
I am confident in setting up and connecting to the database, I just can’t figure out how to take each element and place it in a new row in the database.
Thanks,
Matt
It depends on which technology you are using (Please note that when inserting lots of rows the use of
SqlBulkCopyis recommended).ADO.NET
LINQ-to-SQL
LINQ-to-Entities