DataSet and DataRow Question

Y

Yosh

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
 
G

Guest

Yosh said:
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

No, not until you detach the row from whatever table it was in, in DataSet
A. A DataRow can only belong to one DataTable and, likewise, a DataTable can
only belong to one DataSet.

What you more likely want to do is create a brand new row for the table in
DataSet B and initialize it with the ItemArray from the existing row in
DataSet A.

-- Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top