Re: DataSet Cloning Problem
From: dotNetDave (dotNetDave_at_discussions.microsoft.com)
Date: 01/11/05
- Next message: TOM: "Data Connection to SQL Server"
- Previous message: Steve Barker: "Accessing Paradox Tables From C# Using ODBC"
- In reply to: Cor Ligthert: "Re: DataSet Cloning Problem"
- Next in thread: Cor Ligthert: "Re: DataSet Cloning Problem"
- Reply: Cor Ligthert: "Re: DataSet Cloning Problem"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 11 Jan 2005 08:45:05 -0800
Yes, you are right, that works, but for some reason cloning won't work for
the DataSet that I create with the xml below using DataSet.ReadXml:
<Media xmlns="http://mycompany.com/MediaConfig">
<Type>Encode</Type>
<Standard>NTSC</Standard>
<Peripheral>
<ID>1</ID>
<NumWindows>1</NumWindows>
<Video>
<Name>Camera #1</Name>
<Source>0</Source>
<FrameRate>30</FrameRate>
<BitRate>3000000</BitRate>
<Resolution>4CIF</Resolution>
<McastIP>239.128.0.153</McastIP>
<Port>4000</Port>
</Video>
<Audio>
<Source>LEFT</Source>
<SampleRate>16000</SampleRate>
<McastIP>235.0.0.52</McastIP>
<Port>4001</Port>
</Audio>
</Peripheral>
</Media>
If you have any suggestions, please let me know.
David
"Cor Ligthert" wrote:
> David,
>
> I tried this code.
> \\\
> DataSet ds = new DataSet("Media");
> DataTable dt = new DataTable("Media");
> dt.Columns.Add("Media");
> dt.Rows.Add(dt.NewRow());
> dt.Rows[0][0] = "Media";
> ds.Tables.Add(dt);
> ds.WriteXml("C:\\Test1\\Media.XML",XmlWriteMode.WriteSchema);
> ///
>
> It gave this dataset,
>
> <?xml version="1.0" standalone="yes"?>
> <Media>
> <xs:schema id="Media" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
> <xs:element name="Media" msdata:IsDataSet="true" msdata:Locale="nl-NL">
> <xs:complexType>
> <xs:choice maxOccurs="unbounded">
> <xs:element name="Media">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="Media" type="xs:string" minOccurs="0" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:choice>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> <Media>
> <Media>Media</Media>
> </Media>
> </Media>
>
> Therefore can you explain it a little bit more?
>
> Cor
>
>
>
- Next message: TOM: "Data Connection to SQL Server"
- Previous message: Steve Barker: "Accessing Paradox Tables From C# Using ODBC"
- In reply to: Cor Ligthert: "Re: DataSet Cloning Problem"
- Next in thread: Cor Ligthert: "Re: DataSet Cloning Problem"
- Reply: Cor Ligthert: "Re: DataSet Cloning Problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|