I have an ASP.net application and need to upload .csv files to SQL server. These files will consist of some data collected from visitors and then transported to SQL server table for permanent storing. My last experiment has showed me that manipulating .csv files can be very slow. Can you recommend me some way of uploading .csv files to SQL Server?
You can try few things regarding this problem. If your .csv files are stored somewhere and filled with information about different visitors and then, after some time, are uploaded to SQL server you can loop through .csv file and insert row by row in SQL server table. This is not the fastest way possible but it is safe one because if something fails it will fail on only one entry and not on the whole file. Other way is to use BULK INSERT from Microsoft web site, but this only works if .csv file and SQL server are on the same machine.