ADO Persisted Recordset XML
-
Hi Can anyone tell me if there is a method of loading an ADO persisted recordset XML file (VB6) into a .NET datatable, without installing ADODB in the project?
David Loring !! Keep Music Live !!
DA_Loring wrote:
without installing ADODB in the project?
Which project? The VB6 one that writes the XML file or the VB.NET one that loads it? Or do I have that backwards? The only other way would be to load the document into an XmlDocument object and parse it manually.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
DA_Loring wrote:
without installing ADODB in the project?
Which project? The VB6 one that writes the XML file or the VB.NET one that loads it? Or do I have that backwards? The only other way would be to load the document into an XmlDocument object and parse it manually.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Hi Dave The VB6 project writes the file and the .NET project loads it. I did find .ReadXML but the project is not in a state to run this yet. Would .ReadXML understand the VB6 recordset schema? The code I was thinking to use is dTable.ReadXml(shareParams.OperationalShare & "\" & shareParams.GeneralInputFolder & "\" & dtRow("DataFileName")) Where dTable is a DataTable and the parameter is the file name.
David Loring !! Keep Music Live !!
-
Hi Dave The VB6 project writes the file and the .NET project loads it. I did find .ReadXML but the project is not in a state to run this yet. Would .ReadXML understand the VB6 recordset schema? The code I was thinking to use is dTable.ReadXml(shareParams.OperationalShare & "\" & shareParams.GeneralInputFolder & "\" & dtRow("DataFileName")) Where dTable is a DataTable and the parameter is the file name.
David Loring !! Keep Music Live !!
XML is a standardized format, having nothing to do with VB6. ADO will still use the same data types. And yes, you'd probably use DataSet.ReadXml to load the data. It's easy enough to test. Should take you about 20 minutes to wipe together two small apps to test the data export to XML and read it again in VB.NET.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
XML is a standardized format, having nothing to do with VB6. ADO will still use the same data types. And yes, you'd probably use DataSet.ReadXml to load the data. It's easy enough to test. Should take you about 20 minutes to wipe together two small apps to test the data export to XML and read it again in VB.NET.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007