Is there an easy way to copy a DataRow object for use by the DataAdapter.Update method?

J

Jen

I need to copy a DataRow because I can't use the "donor" DataRow for the
DataAdapter.Update because it throws the "this row already belongs to
another table" exception. Is there an easy way to create a new DataRow from
the donor DataRow without having to explicitly copy each column? My donor
DataRow will not have columns that are null but my new DataRow already has
all the columns. I just need to copy the columns that are non-null and was
wondering if there's a way to do it short of having to do all the code to
copy the columns one by one.
 

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