Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Attach a DataTable to a DataSet
Message
From
13/03/2005 18:05:04
 
 
To
13/03/2005 17:50:41
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 1.1
OS:
Windows 2000 SP4
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
00995022
Message ID:
00995337
Views:
21
Sylvain,

>On the client side, I couldn't find neither how to create a DataTable from a XML. All the methods that I've found that create a DataTable accept a XML from a stream or a file.<

Yeah, examples of this don't seem to be easy to find, but it's quite easy to do:
DataSet oData = new DataSet();
StringReader sr = new StringReader(XML);
oData.ReadXml(sr, XmlReadMode.InferSchema);
~~Bonnie



>Thanks Kevin. I looked at this technique, but could not find how to make it work. On the server side, GetXML return the XML without the schema. You need to call GetXMLSchema to get it. My understanding is that you should return a well-formed XML that contains both the data and the schema, but I can't find how to bind the results of GetXML and GetXMLSchema together.
>
>On the client side, I couldn't find neither how to create a DataTable from a XML. All the methods that I've found that create a DataTable accept a XML from a stream or a file.
>
>>Several people have also recommended converting the dataset to/from XML when you pass between physical boundaries (by using MyDataSet.GetXml). This would allow other programs to tap into your application.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform