F
Francois Malgreve
Hi,
I am using .NET 1.1.
I have a windows application that imports large excel file (can be up to
60.000 rows) into a dataset, transforms the dataset and need to save that
dataset into an SQL Server 2000 DB.
I would like to know what is an efficient way to do this job because if i do
that with a regular datset / dataAdapter, my guess is that if there is
50.000 rows to insert, it will call the SQLCommand 50.000 times which must
be bad performance wise.
Note that the Dataset will always contain new rows and is used to perform an
import type of task. Simply put I need to know how i can import a large
amount of rows into a SQL DB from a windows .NET application.
I was starting to think of saving my dataset into an Excel file and then use
the DTS COM object (dtspck.dll) to transfer the data from the excel file
into the database through a DTS. But I was wondering if there were no way to
do that in pure .NET. I guess that .Net architects thought of people who
need to insert a large amount of rows at the same time... If not I will
continue with my COM DTS thing but I am not so keen to go that way. I looks
like i will use old APIs for a task for which new APIs may already exist.
Thanks for your help.
Best,
Francois Malgreve
I am using .NET 1.1.
I have a windows application that imports large excel file (can be up to
60.000 rows) into a dataset, transforms the dataset and need to save that
dataset into an SQL Server 2000 DB.
I would like to know what is an efficient way to do this job because if i do
that with a regular datset / dataAdapter, my guess is that if there is
50.000 rows to insert, it will call the SQLCommand 50.000 times which must
be bad performance wise.
Note that the Dataset will always contain new rows and is used to perform an
import type of task. Simply put I need to know how i can import a large
amount of rows into a SQL DB from a windows .NET application.
I was starting to think of saving my dataset into an Excel file and then use
the DTS COM object (dtspck.dll) to transfer the data from the excel file
into the database through a DTS. But I was wondering if there were no way to
do that in pure .NET. I guess that .Net architects thought of people who
need to insert a large amount of rows at the same time... If not I will
continue with my COM DTS thing but I am not so keen to go that way. I looks
like i will use old APIs for a task for which new APIs may already exist.
Thanks for your help.
Best,
Francois Malgreve