September 25, 2008 at 8:00 am
All,
There is a new task which my team has to complete it by next week. the task is UI has to upload the .csv file into the DB table. UI has the option to choose the .CSV file,maximum files in the list box is 10. User may choose any number of file any time. This is our task.
one of my co-worker sugested to use the SP. But i said there is some problem when we use SP to do this. Say for example, if the file is having 10000 rows, we need to call our SP 10000 times. The key question is 'how we need to insert those 10000 rows into the DB ? '
what are the possible ways to do it ?
Inputs are highly appreciable !
karthik
September 26, 2008 at 1:11 am
Any inputs ?
karthik
October 2, 2008 at 12:39 pm
Hello,
If the UI is written in a language like C# or Java or VBasic, you can call a .bat script and execute it.
You can have the UI take the file selected from the drop down list and feed it as a parameter to the .bat. The .bat can use bcp to feed the data to the data set.
bcp is as fast an data import method as there is ( IMHO ).
bcp has parameters to deal with comma delimited data.
Another way would be to call a DTS setup. That can be more complicated.
Hope this helps,
Terry
October 2, 2008 at 9:33 pm
You can try this from .Net,
http://dotnetslackers.com/articles/ado_net/SqlBulkCopy_in_ADO_NET_2_0.aspx
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply