473,396 Members | 1,599 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.

DataSet and DataRow Question

Let's say I have a DataRow that I got from DataSet "A". Can I modify the data in the DataRow and add it to a new DataSet "B" and have it update the same datasource?

I hope this makes sense.

Yosh

sorry for the multiple post but I wanted the post in this newsgroup
Jul 21 '05 #1
1 1376
How did you GET the said DataRow from (a DataTable in) DataSet A? If you use
DataTable.NewRow() and then add the new DataRow to a DataTable in DataSet B,
as long as both table have the same schema, you can do it.

You can simply use DataTable.ImportRow() without explicitly creating a new
DataRow:

DataSetB.Tables["Table1"].ImportRow(DataSetA.Tables["Table1"].Rows[0]);

"Yosh" <Yo**@nospam.com> wrote in message
news:OY**************@TK2MSFTNGP12.phx.gbl...
Let's say I have a DataRow that I got from DataSet "A". Can I modify the
data in the DataRow and add it to a new DataSet "B" and have it update the
same datasource?

I hope this makes sense.

Yosh

sorry for the multiple post but I wanted the post in this newsgroup
Jul 21 '05 #2

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

Similar topics

6
by: Boaz Ben-Porat | last post by:
I heard somewhere that the DataGrid class is implemented as a XML graph in memory. Is this true ? TIA Boaz Ben-Porat DataPharm a/s Denmark
2
by: Mojtaba Faridzad | last post by:
Hi, Please check these lines: DataSet dataSet = new DataSet(); dataAdapter.Fill(dataSet, "mytable"); DataRow row; row = dataSet.Tables.Rows; row.BeginEdit(); row = "555";
5
by: Trond | last post by:
I have a webservice that is returning a dataset. In dataset there is a table with 4 columns. (LDate, LTime, LDepth and ServiceNumber) I then try to read only 2 of the columns into array (double...
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
3
by: jcrouse | last post by:
I have the following code that creates a couple of XML files: Dim dt1 As New DataTable("P1JoyUp") If H = True Then Dim dsH As New DataSet("HCPViewer") dsH.Tables.Add(dt1)
4
by: Nikolay Petrov | last post by:
how to assign data from a dataset to an array or other variables? how to address data, contaning in dataset. I know it is organized in row, but how to work with them?
1
by: Yosh | last post by:
Let's say I have a DataRow that I got from DataSet "A". Can I modify the data in the DataRow and add it to a new DataSet "B" and have it update the same datasource? I hope this makes sense. ...
2
by: Joe | last post by:
Hi I have a dataset with 3 tables and 2 relations Is there a way to when I am at 1 row to tell if there is a relation on that row ??? I have the code hardcoded but try to make it work if the #...
3
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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:
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...

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.