|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Serialize a datasetHow do a serialize a dataset?
I tried string buf; buf = mydataset.GetXml(); I got the data but no Schema. There is a GetXmlSchema, but I want everything together. Can I append the dataset string to the schema string and get a complete dataset? -- Arne Garvander Certified Geek This will give you the schema:
StringWriter writer = new StringWriter(); XmlSerializer ser = new XmlSerializer(typeof(DataSet)); ser.Serialize(writer, dataSet); return writer.ToString(); Show quote "Arne Garvander" <ArneGarvan***@discussions.microsoft.com> wrote in message news:5D099EA6-DAA2-409E-BEEF-D20148963871@microsoft.com... > How do a serialize a dataset? > I tried > string buf; > buf = mydataset.GetXml(); > I got the data but no Schema. > There is a GetXmlSchema, but I want everything together. > Can I append the dataset string to the schema string and get a complete > dataset? > > -- > Arne Garvander > Certified Geek >
Other interesting topics
|
|||||||||||||||||||||||