I start with an Excel spreadsheet and I'm displaying it to the user in a gridview, who then can save the gridview to a database table if it looks good.
What is the best way to save the data? I just googled this and read that I should be using SqlBulkCopy. It seems we've been through this before and do I really want to use bulk copy for 800 records?
Also, I can either save the original Excel file to the sql table, or save the gridview. I was going to do the former, because the user can't modify any cells. That is because this spreadsheet originates with person/company A and it's actually person/company B who does the load. So if any data are bad, B might have to go back to A to fix the spreadsheet. But I am not 100% sure about that, so I thought it might make for easier future maintenance if the save was from the gv to the table, so if in the future the user can modify the gv, less programming changes have to be done.
I don't need any code samples. If I know what to use I will know how to code it. I just want advice on the best way.
Thanks.
What is the best way to save the data? I just googled this and read that I should be using SqlBulkCopy. It seems we've been through this before and do I really want to use bulk copy for 800 records?
Also, I can either save the original Excel file to the sql table, or save the gridview. I was going to do the former, because the user can't modify any cells. That is because this spreadsheet originates with person/company A and it's actually person/company B who does the load. So if any data are bad, B might have to go back to A to fix the spreadsheet. But I am not 100% sure about that, so I thought it might make for easier future maintenance if the save was from the gv to the table, so if in the future the user can modify the gv, less programming changes have to be done.
I don't need any code samples. If I know what to use I will know how to code it. I just want advice on the best way.
Thanks.