Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XML data source question
Message
General information
Forum:
ASP.NET
Category:
WebForms
Miscellaneous
Thread ID:
00812411
Message ID:
00812425
Views:
10
Alan,

In looking at your code, it doesn't appear you assign the XML import to a table named "arcusp". You are just importing it into a DataTable but ADO.NET doesn't know how to name it. You can use the TableName property of the DataTable to assign a specific name.

>I'm trying to read a simple XML file and bind it to a grid on a windows form. This is for display only. However, I keep getting an error and can't figure out where I'm going wrong.
>
>The XML data has no schema.
>
>Example: (tags markers have been removed for posting here)
>?xml version = "1.0" encoding="Windows-1252" standalone="yes"?
>VFPData
>a_arcusp custno="BUNIND" item="RP-123K" price="8.83000" percent="0" effective="2003-05-22"/
>a_arcusp custno="BUNDAL" item="BR-736" price="10.50000" percent="0" effective="2003-05-22"/
>/VFPData
>
>the c# code is as follows:
>string fileName = "d:\\development\\pda\\dotnet\\arcusp.xml";
>DataSet newDS = new DataSet();
>newDS.ReadXml(fileName, XmlReadMode.IgnoreSchema);
>grdIntoStock.SetDataBinding(newDS,"arcusp");
>
>I keep getting the following error
>
>"Cannot create a child list for field arcusp".
>
>Obviously I'm doing something wrong, any suggestions folks?
>
>Thanks
>
>Alan Wyne
>IS Manager
>Rollpak Corp
-----------------------------------------

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