|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Convert Access data to XMLtable into XML which will allow me on a form to read the table into XML, edit, then reconvert it back to the Access table. I have successfully added the Northwind database to my data sources in Visual Studio 2003 (Standard Edition). I also have the following code which reads from an EXISTING XML file not related to the Access file. How could I alter it to pull from Access? Below is the read and Write SUBS for the existing XML: Private Sub btnLoadXml_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadXml.Click Dim xtr As XmlTextReader = _ New XmlTextReader("C:\Documents and Settings\dcampbe\My Documents\Visual Studio 2005\Projects\310C02\310C02\Books.xml") xdd = New XmlDataDocument() ds = xdd.DataSet() ds.ReadXmlSchema(xtr) xtr.Close() xtr = New XmlTextReader("C:\Documents and Settings\dcampbe\My Documents\Visual Studio 2005\Projects\310C02\310C02\Books.xml") xtr.WhitespaceHandling = WhitespaceHandling.None xdd.Load(xtr) dgXML.DataSource = ds dgXML.DataMember = "Book" xtr.Close() End Sub Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click Dim xtw As XmlTextWriter = New XmlTextWriter("C:\Documents and Settings\dcampbe\My Documents\Visual Studio 2005\Projects\310C02\310C02\Books.xml", System.Text.Encoding.UTF8) xtw.Formatting = Formatting.Indented xdd.WriteTo(xtw) 'Clean up xtw.Close() MessageBox.Show("The XML file has been successfully updated !") End Sub Hello Parasyke,
You could... Create a DataSet Create a DataTable in the DataSet Fill the DataTable with data from the Access DB Serialize the DataSet to disk or memory for editing Then to round-trip it.. Deserialize the XML doc back into a DataSet Update the Access DB from the DataSet -Boo
Assigning the result of a '/' division to an integer type causes rounding
last ditch attempt to try and get this working error in the update Array Problems - still cant get something set up right. Dll fails to register Streamreader doesn't read the line properly identity /autonumber drives me nuts From Delphi to VB WithEvents code in module cannot change textbox on main form Reading XML file getting error |
|||||||||||||||||||||||