473,382 Members | 1,421 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,382 software developers and data experts.

Inserting a dataset

Hi

How can I insert a dataset into an sql table?

Thanks

Regards
Dec 27 '05 #1
3 953
Start here with the MSDN information to see if that helps you. It may at
least narrow your question when, after trying the examples, you run into any
stumbling blocks.

SQL DataAdaptor:
http://msdn.microsoft.com/library/de...classtopic.asp

Let us know if you have further questions!
chrisj

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eW**************@TK2MSFTNGP09.phx.gbl...
Hi

How can I insert a dataset into an sql table?

Thanks

Regards

Dec 27 '05 #2
That's going to depend on how the datatables inside the dataset were
populated. The key is rowstate and if it's not changed (Modified, Deleted,
Added) then you're going to have to loop through the rows and fire your sql
statements based on those values.

Where is the data coming from in the first place? DTS might be a much better
way to go about doing this if at all possible.
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eW**************@TK2MSFTNGP09.phx.gbl...
Hi

How can I insert a dataset into an sql table?

Thanks

Regards

Dec 27 '05 #3
The dataset would have new data only i.e. no conflict with existing keys and
also it only needs to be appended. The dataset insert is to be done within a
webmethod which gets the dataset as parameter from the calling procedure.

Thanks

Regards

"W.G. Ryan - MVP" <Wi*********@nospam.gmail.com> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
That's going to depend on how the datatables inside the dataset were
populated. The key is rowstate and if it's not changed (Modified,
Deleted, Added) then you're going to have to loop through the rows and
fire your sql statements based on those values.

Where is the data coming from in the first place? DTS might be a much
better way to go about doing this if at all possible.
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eW**************@TK2MSFTNGP09.phx.gbl...
Hi

How can I insert a dataset into an sql table?

Thanks

Regards


Dec 27 '05 #4

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

Similar topics

0
by: a | last post by:
I've read and split a delimited text file into a dataset. It looks fine in a datagrid (5 columns and 5,000 rows), but I've been trying, without success, to then insert the resulting dataset called...
2
by: a | last post by:
NEW Post Here's my best guess at how to insert this dataset.... the code runs, but no new records are added to the sql table. I've read and split a delimited text file into a dataset. It...
6
by: Pushpendra Vats | last post by:
Hi , I am trying to insert records into database. I am trying to write the following code. On button1 click event i am inserting five records and after that i am calling the update method of...
6
by: Mike Wilson | last post by:
Dear Group, I have a heirarchical set of database tables, say - "order" and "order_type" and want to display a series of orders in a grid control, and in place of the order_type foreign key...
0
by: Peter Newman | last post by:
VB.net ( 2003 ) & SQL 2005 Thank you for all the help in navigating through the dataset using the CurrencyManager. However im now stuck on the next part , Updating, and addind records. how can...
0
by: hzgt9b | last post by:
Using VS2003, VB.NET, Here's some pseudo code that I'm trying to get to work... if <a specific record existsthen do nothing else <insert the specific record> Endif I've got the code...
3
by: Surya | last post by:
Dear All, I have problem on inserting a record to database..Although it looked easy.. i have caught up with following issue .. please go ahead and help me to find solution I Need to insert...
1
by: hanusoft | last post by:
This is an example of Inserting and Retrieving data from xml file. private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here ...
0
by: toyin | last post by:
hello, pls help look through this code its not inserting the record in dataset into the another database. i want to insert the row in the dataset into another table in another database. pls help....
0
by: SL Culby | last post by:
Hello everyone, I have a project where I pull SQL Server data put it into a dataset and now I have to put the dataset data into an Access Database. The dataset currently is over 2000 row, so looping...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.