XmlDataSource

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using an XmlDataSource to modify data in an xml file located on my web
server. I want to be able to rollback changes made to the XmlDataSource
since the last time I used the save method. How can I do this?
 
Hi,

When you use DataFile property to specify a xml file for the XmlDataSource
control, it will load the xml file into an internal XmlDocument (you can
get this document by using the XmlDataSource's GetXmlDocument method). When
you call XmlDataSource.Save method, the internal XmlDocument will be saved
to the file specified by the DataFile property (the file will be
overwritten).

I understand your objective here is to "rollback" the changes made to the
XmlDataSource since the last time you used the save method.

Based on my understanding, to "rollback" the changes, you just need to
re-bind the XmlDataSource, this will make it to re-read from the xml file
specified by property DataFile.

I hope I haven't misunderstood anything. Please feel free to let me know if
there's anything unclear. Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top