Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding to create file to convert XML to DataSet
Message
De
25/08/2010 10:01:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/08/2010 12:46:36
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01477799
Message ID:
01478345
Vues:
44
>>What do you mean? It doesn't need a file to be created on disk. Do you mean persisting the DataSet? Then you would need to use WriteXml(). For example:
>>
>>
string s = @" ... XML here ...";
>>DataSet ds = new DataSet();
>>ds.ReadXml(new StringReader(s));
>
>If you intellisense it, you will see that it only shows the parameter as a file name. However, there is an overload in that method. Using it resolves the issue.

Yes using StringReader overload resolves it.

That is weird. My intellisense is showing more than file name, namely 8 overloads. Here is what I get under .Net 2.0-3.5:
ds.ReadXml(string fileName)
ds.ReadXml(System.IO.Stream stream)
ds.ReadXml(System.IO.TextReader reader)
ds.ReadXml(System.Xml.XmlReader reader)

ds.ReadXml(string fileName,System.Data.XmlReadMode mode)
ds.ReadXml(System.IO.Stream stream,System.Data.XmlReadMode mode)
ds.ReadXml(System.IO.TextReader reader,System.Data.XmlReadMode mode)
ds.ReadXml(System.Xml.XmlReader reader,System.Data.XmlReadMode mode)
I use C# but I don't think VB would only show one overload. Otherwise it would be a definite reason for not using VB:)

PS: Just tried with VB. You are right, although it shows that there are 8 overloads the intellisense in VB sucks, you can't navigate overloads easily.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform