PC Review


Reply
Thread Tools Rate Thread

Bulk Insert From Dataset

 
 
=?Utf-8?B?RGlhbm5h?=
Guest
Posts: n/a
 
      28th Nov 2004
I have a datafeed coming from another Database which I am populating into a
Dataset. I want to take the dataset and insert all the rows into a Sql
Table. So far I have an 'insert stored proc' and I pass all the parameters
from .Net and execute (1 row at a time). However, this is tedious. This
data feed contains about 100 columns (so I have to pass 100 parameters to the
Stored Proc). It is a straight insert (the columns in the datatable are the
same as the columns in the sql table and no identity column).

Is there an easier way to do this? In the old days I would have just used a
BCP. However, this app uses a Data Access Layer and we want to put all our
data access functions here.

I have been fooling around with the Data Adapter, but it seems that I will
have to still pass all the parameters to the insert stored proc.

Any help would be great.
Thanks, Dianna

 
Reply With Quote
 
 
 
 
=?Utf-8?B?U2hhdW4gUnlhbg==?=
Guest
Posts: n/a
 
      8th Dec 2004
Hi Dianna...

If you moving large chunks of data around you really should use an ETL tool.

It would be very quick and simple to develop a DTS package to do a quick
bulk column copy (it is wise to disable transaction logging and remove and
rebuild indexes if the amount of is in the of order GBs).

Then write .NET code to call the DTS package passing in the source and
target connection properties for the database.

Shaun.

"Dianna" wrote:

> I have a datafeed coming from another Database which I am populating into a
> Dataset. I want to take the dataset and insert all the rows into a Sql
> Table. So far I have an 'insert stored proc' and I pass all the parameters
> from .Net and execute (1 row at a time). However, this is tedious. This
> data feed contains about 100 columns (so I have to pass 100 parameters to the
> Stored Proc). It is a straight insert (the columns in the datatable are the
> same as the columns in the sql table and no identity column).
>
> Is there an easier way to do this? In the old days I would have just used a
> BCP. However, this app uses a Data Access Layer and we want to put all our
> data access functions here.
>
> I have been fooling around with the Data Adapter, but it seems that I will
> have to still pass all the parameters to the insert stored proc.
>
> Any help would be great.
> Thanks, Dianna
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Speed up Bulk Insert Dataset records! Jay Balapa Microsoft Dot NET Compact Framework 1 28th Jun 2006 10:41 PM
Speed up Bulk Insert Dataset records! Jay Balapa Microsoft ADO .NET 1 28th Jun 2006 10:41 PM
Opinions wanted: Bulk Insert vs Record Insert =?Utf-8?B?RGFsZSBGeWU=?= Microsoft Access Form Coding 2 8th Mar 2006 03:26 PM
Bulk Inserts Via DataSet John B. Microsoft ADO .NET 5 26th Jan 2004 02:12 AM
fastest way to insert data (no bulk insert, no dts) Hakan Eren Microsoft ADO .NET 3 18th Sep 2003 05:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:59 AM.