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.comwww.prenia.comWeblog: blogs.prenia.com/cathi