Help Again!!
How Do Read an XML file into a dataset any clues??
i've looked at the microsoft site and it's just got me even more confused!!
sorry i'm new to this!!!
Printable View
Help Again!!
How Do Read an XML file into a dataset any clues??
i've looked at the microsoft site and it's just got me even more confused!!
sorry i'm new to this!!!
I believe it is:
VB Code:
myDataSet.ReadXml(...)
i have tried that and it doen't seem to add anything into the dataset.
has anyone got some code for me to look at i'm using an xml document from excel!
ReadXML is what you are looking for, post your code. Should just be myDataSet.ReadXML(filepathhere)
From MSDN:
If the DataSet does not contain a schema, and there is no inline schema, no data is read.
Inline schema can be defined using XML Schema definition language (XSD) schema. For details about writing inline schema as XML Schema, see Generating DataSet Relational Structure from XML Schema (XSD).
What that means to you is this: If the DataSet cannot determine how to construct the data, then you must define the XSD.
Look here for some more examples, hints:
http://msdn.microsoft.com/library/de...e_from_xsd.asp
http://msdn.microsoft.com/library/de...setfromxml.asp
VB Code:
ds.ReadXml(fs, XmlReadMode.InferSchema)
That worked for me on a sample workbook.
Hi i gave up on the xml thing but now it has come back and bitten a big chunk out of my ass.
i have now got a xml file with 10,000 names and address on it and i need to import this into a dataset then save it on to the main database.
i have got it reading as above (thanks guy's) now i need a little more help.