0

I want to let my users to upload 3000-4000 rows of data into SQL Server 2008. I would like to use SqlBulkCopy. What is the best policy to do it?

Option A:

  • First the .csv file will be uploaded to the server and then SqlBulkCopy operation will be started.

Option B:

  • Read .csv file from user's pc and then send that data to the server.

I am new to ASP.Net.

Thank you.

4

1 回答 1

2

这实际上取决于您的情况以及“最快”的含义。在服务器端“加载”数据服务器端(意思是选项 A,上传,然后导入)几乎肯定会在服务器端更快。但是,如果用户体验更重要,您也可以“处理”数据客户端并启动异步上传器。

我会选择选项 A,只是为了让“上传”与“导入”过程脱钩。

于 2013-03-11T21:08:41.553 回答