473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Bulk Insert From Dataset

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

Jul 21 '05 #1
1 5944
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

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: php newbie | last post by:
Hello, I am trying to load a simple tab-delimited data file to SQL Server. I created a format file to go with it, since the data file differs from the destination table in number of columns. ...
7
by: iqbal | last post by:
Hi all, We have an application through which we are bulk inserting rows into a view. The definition of the view is such that it selects columns from a table on a remote server. I have added the...
6
by: pk | last post by:
Sorry for the piece-by-piece nature of this post, I moved it from a dormant group to this one and it was 3 separate posts in the other group. Anyway... I'm trying to bulk insert a text file of...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
3
by: Kiran | last post by:
Hi, I want to back up my data in some table in SQL server and import it back using Bulk Load of SQL server 2K. I can use the following code to backup the data in XML ...
0
by: Eric Paul | last post by:
I have been in search of a better way to handle bulk inserts and updates into SQL 2000 using c# and while I have found a few different ways to accomplish this I was wondering what is considered to...
1
by: Dianna | last post by:
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...
0
by: ozkhillscovington | last post by:
We have sp's in place that do BULK INSERTS from txt files into the tables. This works fine, however they have asked us to add a field that identifies accounting ctr. The only thing that identifies...
0
by: rshivaraman | last post by:
BULK INSERT bill_tbl FROM 'd:\ftp_Data\in\baddress.dat' WITH ( FIELDTERMINATOR = ';', ROWTERMINATOR = '\n' ) --------------------------------- This is the query used to populate bill_tbl....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.