Re: WriteXML
- From: <drchips@xxxxxxxxxxxxx>
- Date: Wed, 28 Dec 2005 16:00:35 -0500
Hi Kevin,
Thank you for your replies.
I'm able to add the rows fine. I've verified their contents and everything
(using the immediate window). It's just when I write the xml (last line)
there's nothing in the file except
<?xml version="1.0" standalone="yes"?>
<NewDataSet />
No data. What am I doing wrong? (Snippet posted below again.)
{
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;
}
"Kevin Yu [MSFT]" <v-kevy@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:rKztiKECGHA.1240@xxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> You can use DataTable.Rows.Add method, since it has an overload which
> accepts and object array directly and argument. So, please check dsTemp to
> see if any rows have been imported properly.
>
> 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]
- Re: WriteXML
- From: drchips
- Re: WriteXML
- From: Kevin Yu [MSFT]
- WriteXML
- Prev by Date: Re: Query Two Databases
- Next by Date: Binding problem after clear with dataview
- Previous by thread: Re: WriteXML
- Next by thread: Re: WriteXML
- Index(es):
Relevant Pages
|
|