Re: WriteXML
- From: <drchips@xxxxxxxxxxxxx>
- Date: Thu, 22 Dec 2005 12:40:22 -0500
Not sure what I'm doing wrong here. Here is a snippet of my export and at
the and is the result. I've verified the data in the datatables.
public void ExportXmlRecord(string sFilePath)
{
DataSet dsTemp = new DataSet();
Ds.spGetCardioScheduleDataTable CS = new Ds.spGetCardioScheduleDataTable();
DataTable _dtEchoExport = new Ds.spGetEchosDataTable();
Ds.spGetCardioScheduleRow csRow = (Ds.spGetCardioScheduleRow) CS.NewRow();
Ds.spGetEchosRow ecRow = (Ds.spGetEchosRow) _dtEchoExport.NewRow();
csRow.ItemArray = _DrCS.ItemArray;
ecRow.ItemArray = _dtEchosRes.Rows[0].ItemArray;
CS.AcceptChanges();
_dtEchoExport.AcceptChanges();
dsTemp.AcceptChanges();
_dtEchoExport.NewRow();
dsTemp.Tables.Add(CS);
dsTemp.Tables.Add(_dtEchoExport);
dsTemp.WriteXml(sFilePath,XmlWriteMode.IgnoreSchema);
return;
}
Here's the result:
<?xml version="1.0" standalone="yes"?>
<NewDataSet />
Any help is appreciated.
"Kevin Yu [MSFT]" <v-kevy@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:pwTwd$rBGHA.3764@xxxxxxxxxxxxxxxxxxxxxxxx
> Hi David,
>
> As you can see, the DataSet.WriteXml method can only write the whole
> DataSet data to an Xml stream. In this case, if you only need to pick some
> of the rows, creating a new dataset and copy the row you need to write
> will
> be a good idea.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>
.
- Follow-Ups:
- Re: WriteXML
- From: Kevin Yu [MSFT]
- Re: WriteXML
- References:
- WriteXML
- From: drchips
- RE: WriteXML
- From: Kevin Yu [MSFT]
- WriteXML
- Prev by Date: RE: WriteXML
- Next by Date: RE: Replacement for VB 6.0 Record sets
- Previous by thread: RE: WriteXML
- Next by thread: Re: WriteXML
- Index(es):
Relevant Pages
|
|