Click here to Skip to main content
15,908,618 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: string vs CString Pin
peterchen21-May-05 11:39
peterchen21-May-05 11:39 
GeneralRe: string vs CString Pin
Steve Messer21-May-05 12:15
Steve Messer21-May-05 12:15 
GeneralRe: string vs CString Pin
Bob Stanneveld22-May-05 1:26
Bob Stanneveld22-May-05 1:26 
GeneralRe: string vs CString Pin
Tim Smith22-May-05 3:54
Tim Smith22-May-05 3:54 
GeneralRe: string vs CString Pin
peterchen22-May-05 5:15
peterchen22-May-05 5:15 
GeneralRefresh DataGrid when closing dialog Pin
dafatdude20-May-05 19:09
dafatdude20-May-05 19:09 
GeneralWhich is faster... Pin
NeverFall20-May-05 15:35
NeverFall20-May-05 15:35 
GeneralRe: Which is faster... Pin
mkuhac20-May-05 16:19
mkuhac20-May-05 16:19 
GeneralRe: Which is faster... Pin
rocky_pulley20-May-05 16:51
rocky_pulley20-May-05 16:51 
GeneralRe: Which is faster... Pin
NeverFall20-May-05 18:31
NeverFall20-May-05 18:31 
GeneralRe: Which is faster... Pin
peterchen21-May-05 11:27
peterchen21-May-05 11:27 
GeneralRe: Which is faster... Pin
Alexander M.,21-May-05 12:59
Alexander M.,21-May-05 12:59 
GeneralRe: Which is faster... Pin
Tom Archer20-May-05 16:54
Tom Archer20-May-05 16:54 
GeneralUncaught Exceptions Pin
shawnf2220-May-05 12:23
shawnf2220-May-05 12:23 
GeneralRe: Uncaught Exceptions Pin
Kevin McFarlane20-May-05 12:59
Kevin McFarlane20-May-05 12:59 
GeneralRe: Uncaught Exceptions Pin
liquid_20-May-05 21:24
liquid_20-May-05 21:24 
GeneralRe: Uncaught Exceptions Pin
Tim Smith22-May-05 3:58
Tim Smith22-May-05 3:58 
GeneralRe: Uncaught Exceptions Pin
S. Senthil Kumar21-May-05 0:40
S. Senthil Kumar21-May-05 0:40 
QuestionHow to Add Data to a dataset and write to an xml file Pin
Mikan2320-May-05 11:02
Mikan2320-May-05 11:02 
I have a dataset that I read from an xml file using
DataSet.ReadXml(fs);

I then add to the dataset and rewrite the xml file using the following:

DataRow newrow = mf.quotesDataSet.Tables["quote"].NewRow();<br />
newrow["thequote"] = quoteInput.Text;<br />
newrow["speaker"] = speakerInput.Text;<br />
newrow["origin"] = originInput.Text;<br />
newrow["image"] = "test.jpg";<br />
mf.quotesDataSet.Tables["quote"].Rows.Add(newrow);<br />
mf.quotesDataSet.WriteXml(fw);


It does add the data, however, it adds it outside the main xml hierarchy. For example, instead of:

<rss><br />
<channel><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>new text</thequote></quote><br />
</channel><br />
</rss><br />


it writes to the file as:
<rss><br />
<channel><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>text</thequote></quote><br />
</channel><br />
</rss><br />
<quote><thequote>new text</thequote></quote><br />


how do I make the added rows to the dataset write into the proper hierarchy?
Generaldll problem for mIRC.. Pin
da^hype20-May-05 10:56
da^hype20-May-05 10:56 
GeneralChanging Display Options for Windows Taskbar Pin
wes21420-May-05 8:26
wes21420-May-05 8:26 
GeneralVS2005 - Disabling warning (project-wide) Pin
dandy7220-May-05 7:45
dandy7220-May-05 7:45 
GeneralRe: VS2005 - Disabling warning (project-wide) Pin
PJ Arends20-May-05 8:09
professionalPJ Arends20-May-05 8:09 
GeneralRe: VS2005 - Disabling warning (project-wide) Pin
dandy7220-May-05 8:35
dandy7220-May-05 8:35 
GeneralRe: VS2005 - Disabling warning (project-wide) Pin
David Crow20-May-05 8:35
David Crow20-May-05 8:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.