Dataset -> Xml -> Dataset , how to get it to work?

K

Karl

Hi

I have a dataset with one simple table. I use writeXml method to get the
data as xml, then export it to another app, change the data, and then I get
the Xml back. The problem is to merge/update the Xml data back to a normal
dataset, and then back to the database.

The Xml I get in return from the other app is correct. When I try
dataSet.merge, the records never enters the dataset, and I get no exception
to help me pinpointing the problem.

Anyone knows how to accoplish this?

regards

Karl
 
G

Guest

Try using CopyTo on the table(s) and see if you can pull them into the
DataSet you are trying to update with.

You also have to make sure you are using the same DataAdapter you use to
pull the data originally.

Another thing to check is the update (and possibly insert) command.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
G

Guest

Karl,
The default behavior of the Merge function is to Accept Changes on the
target dataset. If you then try to update the database with a call to
GetChanges on the target dataset, there will be no changes.
If this is the case, try using the following version of Merge:

DS1.Merge(DS2,True)

The True tells Merge to preserve changes.

Hope this helps,
Dave
 

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