How to make a SQL query on a XML data source with ADO?
Posted on 2006-03-29
I'M SORRY FOR MY BAD ENGLISH!
I often used ADO & XML...
The job of persisting a recordset on a XML file (pr string or stream) and reading back it into a recordset object is pretty simple.
The read operation is the subject of this question.
I used a call like this, to read XML file:
Rs.Open XMLFilePath, "Provider=MSPersist;", ... ...
or i used to read using an ADODB.Recordset object with a MSXML2.DomDocument.
Up to here... no problem.
The problem borns when, instead of getting the whole table (recordset) stored into the XML file, I would like to perform a sql quuery on this file. I tryed various approaches like a connectionstring that can handle XML files (none found on the net; I tried with "Provider=MSPersist; DataSource=C:\MyFolder\" and than "SELECT * FROM [MyFile.XML]" doing a thing similar to the method for using text files; I get an error sayng something on ISAM)... and other experiments... but all had fail.
I found nothing useful on the net.
I hope your help and thank you all in advance. Bye.