Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 25th, 2007, 01:09 PM
Registered User
 
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default result from DataSet.WriteXml

Hi,

Is anybody know pleas if the method WriteXml wrap also the ExtendeProperties that assign for each table in the dataset

for example:

///////////////////////////////////////////////
DataSet ds=new DataSet();

DataTable table_name=new DataTable();

DataTable Metadata = new DataTable();

table_name.ExtendedProperties.Add("MetaData", Metadata);

ds.Tables.Add(table_name);

MemoryStream stream=new MemoryStream();

ds.WriteXml(stream,XmlWriteMode.WriteSchema);
//////////////////////////////////////////////////

now ,when I read back to dataset

another_ds.ReadXml(stream);

its not gave me Metadata as DataTable object,

just "Table"

Why? and how can I retraive the object i need?

Thank

Rachamim

 
Old January 28th, 2008, 12:52 PM
Authorized User
 
Join Date: Dec 2004
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to DZukiewicz
Default

Have you reset the stream using

Code:
stream.Position = 0;
?

Assuming this code is all one block, the stream is already at the end. You need to tell the stream to start reading from the beginning again.

Regards,

Dominic





Similar Threads
Thread Thread Starter Forum Replies Last Post
Data set writexml problem tasiekk ADO.NET 0 September 26th, 2006 04:38 AM
WriteXml standalone property mega ADO.NET 0 June 21st, 2006 09:14 AM
problem using Dataset.WriteXml() nitins_301 ADO.NET 0 March 19th, 2005 04:25 AM
DataSet.WriteXML Problem jim.stanley ADO.NET 0 September 21st, 2004 12:27 PM
Missing Columns with WriteXml khautinh General .NET 0 August 20th, 2004 10:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.