Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WriteXML question...
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00741738
Message ID:
00741741
Views:
20
Kevin,

Does your XML file contain the schema, including the data types? Did you use WriteXML to write to the XML file?

>Here's a question on reading and writing XML Files.
>
>Suppose I pull down some data from SQL Server into a DataSet. The data is a Customer ID [an integer type], and a description [character]. The contents of the data set honor the data types [int and char].
>
>Then I write that dataset to an XML file, close the application, then re-open the application and read the XML file into a blank dataset, like so...
>
>DataSet Ds = new DataSet();
>Ds.ReadXML("c:\\mymasterfile.xml");
>
>The data comes back in, but both data types are character. Is there any way, when I originally write out the XML file, that I can get it to retain the data types, such that when I read the XML file back in, I get one integer column and one character column?
>
>Thanks,
>Kevin
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform