XML to ADO Recordset and Back again



I have a VB6 program that uses a global XML document as it's data store. I
want to convert that XML document to an ADO recordset using ADO 2.7, sort
and filter it, then convert that recordset *back* to an XML document.

My problem occurs when I first open the XML document; the resulting ADO
recordset only has one record. I want to get them all.

Here's the code (Error handling omitted for clarity):
------------------------------------------------------------------------------------------------------------------------
Public Function ADORSFromXML(xmlDoc As MSXML2.DOMDocument40) As
ADODB.Recordset

With xmlDoc
.setProperty "SelectionLanguage", "XPath"
.setProperty "SelectionNamespaces",
"xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'
xmlns:ms='urn:schemas-microsoft-com:xslt'"
End With

Set adoRS = New ADODB.Recordset
adoRS.Open xmlDoc
Set ADORSFromXML = adoRS 'return the recordset
Set adoRS = Nothing
End Function
------------------------------------------------------------------------------------------------------------------------

Does anyone know why I'm only getting one record in my ADO recordset? I've
searched the Tubes high and low and can't find a clue.

Thanks in advance..

Barry
bseymour@xxxxxxxxxxx





.



Relevant Pages

  • Re: XML to ADO Recordset and Back again
    ... records from being recognized by the recordset object. ... removing them before opening the recordset on the xml document and let ... Barry Seymour wrote: ... Please reply to the newsgroup. ...
    (microsoft.public.data.ado)
  • Re: XML to ADO Recordset and Back again
    ... I want to convert that XML document to an ADO recordset using ... Set adoRS = New ADODB.Recordset ...
    (microsoft.public.data.ado)
  • Re: XML to ADO Recordset and Back again
    ... records from being recognized by the recordset object. ... removing them before opening the recordset on the xml document and let ... Barry Seymour wrote: ... Please reply to the newsgroup. ...
    (microsoft.public.data.ado)
  • RE: xml to ado recordset
    ... DECLARE @idHndl int ... DECLARE @doc varchar ... --Create an internal representation of the XML document. ... Does anyone know how to read this file as it is into a recordset? ...
    (microsoft.public.vb.database.ado)
  • Re: XML to ADO Recordset and Back again
    ... I fetch an ADO recordset ... I save it to global XML document. ...
    (microsoft.public.data.ado)