save dataSet in xml file

G

Guest

im trying to save the content of a DataSet to xml file but im getting the
message-
" This file has modified outside of the source editor
do you want to reload it ? "
what im missing?

this is what i have wrote-
dataset1.AcceptChanges
dataset1.WriteXml("PathFile.xm")

thanks
 
S

Shiva

Hi,

Likely that you have opened the XML file in your VS .NET editor and you are
trying to overwrite that file through your program.

Click Yes on the prompt to see the new XML file content in the editor.

im trying to save the content of a DataSet to xml file but im getting the
message-
" This file has modified outside of the source editor
do you want to reload it ? "
what im missing?

this is what i have wrote-
dataset1.AcceptChanges
dataset1.WriteXml("PathFile.xm")

thanks
 
S

Shiva

Option 1: From VS .NET IDE, select menu Tools, Options. In
Environment/Documents section, check 'Detect when file is changed outside
the environment' and 'Auto-load changes (if not....)' options and click OK.

Option 2: Use a different file name each time you save the dataset to an XML
file.

HTH.

i dont want the user to see that message
what can i do?
 

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