I can't believe that I can't find this information anywhere. Hopefully someone has run into this before. I have an xml string that I want to convert to an ADO recordset, so I can use a hierarchical flexgrid for display. The file is of the following format:
<Top_Root>
<Field1>
value1
</Field1>
</Top_Root>
I found the following code on Microsoft's website, but it gives me an error stating that the XML is invalid, but I know it's good XML.
'**************************
Dim rs As ADODB.Recordset
Dim stm As ADODB.Stream
Set rs = New Recordset
Set stm = New ADODB.Stream
stm.Open ' Open a stream object
stm.Charset = "iso-8859-1" ' character set strings code for ANSI, ASCII
'Load a Stream object from the XML file
stm.LoadFromFile "C:\test.xml"
' Uncommenting the connection string in the following line generates error 3001
rs.Open stm ', "Provider=MsPersist"
Any and all help is appreciated.
Dave Robinder, MCSD
Programmer
Colorado DataScapes
Colorado Springs, CO
(719) 328-1111
<Top_Root>
<Field1>
value1
</Field1>
</Top_Root>
I found the following code on Microsoft's website, but it gives me an error stating that the XML is invalid, but I know it's good XML.
'**************************
Dim rs As ADODB.Recordset
Dim stm As ADODB.Stream
Set rs = New Recordset
Set stm = New ADODB.Stream
stm.Open ' Open a stream object
stm.Charset = "iso-8859-1" ' character set strings code for ANSI, ASCII
'Load a Stream object from the XML file
stm.LoadFromFile "C:\test.xml"
' Uncommenting the connection string in the following line generates error 3001
rs.Open stm ', "Provider=MsPersist"
Any and all help is appreciated.
Dave Robinder, MCSD
Programmer
Colorado DataScapes
Colorado Springs, CO
(719) 328-1111