Save recordset as XML/Restore from XML? 
Author Message
 Save recordset as XML/Restore from XML?

Hi.

I want to store and restore recordsets as XML? I know ADO 2.1 has this
support.

However, what I'd like to do is craft a recordset by hand, save it as XML
but not as an external file on disk but to a string/variant property (I'm
using VB6, and Excel 97/2000) which I will subsequently store inside an
Excel .XLS file.

Can you tell me if ADO only supports writing to, and reading from, a disk
bound file containing a persisted recordset?

If so, I guess I'm going to have to save the recordset to a hidden XML file
on disk, read the contents of that file into a string, delete the disk file;
and when re-constituting the XML, save the XML string inside the Excel file
to a disk file, get ADO to read it, and then delete it.

Alastair



Wed, 17 Jul 2002 03:00:00 GMT  
 Save recordset as XML/Restore from XML?
if you can use ADO 2.5 (comes with Win2000) - then you will have greate
support for saving recordsets as XML in any object that supports IStream
interface. I am sure Excel does . You do something like this :
...
set obj = new < Excel.Worksheet ??? >
recSet.Save    obj, adPersistXML
...


Quote:
> Hi.

> I want to store and restore recordsets as XML? I know ADO 2.1 has this
> support.

> However, what I'd like to do is craft a recordset by hand, save it as XML
> but not as an external file on disk but to a string/variant property (I'm
> using VB6, and Excel 97/2000) which I will subsequently store inside an
> Excel .XLS file.

> Can you tell me if ADO only supports writing to, and reading from, a disk
> bound file containing a persisted recordset?

> If so, I guess I'm going to have to save the recordset to a hidden XML
file
> on disk, read the contents of that file into a string, delete the disk
file;
> and when re-constituting the XML, save the XML string inside the Excel
file
> to a disk file, get ADO to read it, and then delete it.

> Alastair



Thu, 18 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Save RecordSet as XML

2. Anybody saving recordset as XML???

3. Save recordset to XML in UTF-16?

4. Saving a recordset as an XML object

5. FilterGroupEnum & Recordset Save to XML

6. Can I save XML from an ADO Recordset?

7. Problem saving recordset as XML

8. Anybody saving recordset as XML???

9. XML, Converting Word doc's to XML files (O'2000)

10. How to create a secure connection, send an xml msg and receive and xml response

11. Render XML+XSL into PrintDocument (not XML) ?

12. XML Newbie question, getting a value from an XML string

 

 
Powered by phpBB® Forum Software