inserting string[,] to a SQL server RRS feed

  • Question

  • i have a string[,] consisting of string[FilePath(inc Filemane), Filename]
    now this needs to be sent to SQL now i could just potentially do a foreach Loop throught the entire List

    foreach (row r in string[,])
    //would really call sp but you get the idea
    insert into Filelist (Filepath , Filename) values (r.column[0],r.column[1])
    or something similar

    but i figure it would be better (more efficient) to convert the string[,] to a dataset of some description then update in one swoop (this would obviously require creating the tables prior to the update.

    as potentially  i would need to send 50k files in through this

    any thoughts as i want this process to be as quick as possible

    Wednesday, April 9, 2008 8:39 AM


All replies