| Author |
Topic  |
|
|
Naveed88
Starting Member
India
19 Posts |
Posted - 11/18/2009 : 08:19:56
|
hi all,
i need here to import a bulk data, from csv file to sql table.
i can use "Bulk Insert" from any file to SQL table,
but problem is that i have to manipulate each record and
then insert into their receptive tables.
I have done all this and my system works with up to 1000 records in 100-100 records in each batches..
so it takes 10 rounds to complete...........
but I have to Upload 50,000 at a time csv containing these much record is about 7-MB in size
But **System.ArgumentNullException: Value cannot be null. Parameter name: collection at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at ImportInventory.btnSaveSingPairPar_Click(Object sender, EventArgs e)" error occured.**
error comes
then my question is
How do i increase Connection efficiency or Is there any another method to upload bulk data or Is there any special way to connect sql and then start bulk uploading or Any suggestion would be appriciated
(¨`·.·´¨) Always `·.¸(¨`·.·´¨) Keep (¨`·.·´¨)¸.·´ Smiling! `·.¸.·´ & Programming Regards.... "Deevan" [Naveed Anjum] Web Developer,9867374437-Mumbai.4 |
|
|
toddbkc
Starting Member
USA
9 Posts |
Posted - 11/18/2009 : 12:03:58
|
I have a couple of ideas for you...
One of them is to load the data into a staging table - once you get the data there, then you can insert into all of the underlying tables from that point. This can help you avoid Nullability errors like the one you are getting.
Option 2 is to use Integration Services. With this tool, you can have much better throughput than using Bulk Insert. It is more complex, but in some aspects, can be easier to understand.
TODD |
 |
|
|
Naveed88
Starting Member
India
19 Posts |
Posted - 11/18/2009 : 23:19:44
|
hi TODD,
thanks for precious suggetions let me check these options and i will let u know
thanks again
(¨`·.·´¨) Always `·.¸(¨`·.·´¨) Keep (¨`·.·´¨)¸.·´ Smiling! `·.¸.·´ & Programming Regards.... "Deevan" [Naveed Anjum] Web Developer,9867374437-Mumbai.4 |
 |
|
| |
Topic  |
|
|
|