Reputation: 7291
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:
.csv
file will be uploaded to the server and then SqlBulkCopy
operation will be started.Option B:
.csv
file from user's pc and then send that data to the server.I am new to ASP.Net.
Thank you.
Upvotes: 0
Views: 257
Reputation: 854
It really depends on your scenario and what you mean by 'fastest'. To "load" the data server side (meaning, option A, upload, then import) will almost certainly be faster on the server side. But you could also 'process' the data client side and launch an async uploader if the user experience is more important.
I would go with Option A just to keep the 'upload' decoupled from the 'import' process.
Upvotes: 2