Persist recordset as XML, or cook XML w/ XMLDSO

Persist recordset as XML, or cook XML w/ XMLDSO

Post by Ed Schiebe » Fri, 02 Apr 1999 04:00:00



I am pulling data from a database, converting it to XML, and rendering it as
HTML using XSL.  I seem to have (at least) 2 choices when it comes to
converting the data to XML
(1) call Recordset::Save with adPersistXML or (2) use an ASP page and the
XMLDSO to generate XML.

The first technique requires I create a disk file for the Save, and I deal
with the XML the Recordset writes.  With the second technique I can invent
my own XML document type and the XML never needs touch disk.

My main reservation about using Recordset::Save concerns the XML document
format.  Is the Recordset generated XML in documented and fixed format, or
is it an undocumented/unsupported format likely to change?

Thanks,
Ed Schiebel

 
 
 

Persist recordset as XML, or cook XML w/ XMLDSO

Post by MV » Fri, 02 Apr 1999 04:00:00


Using Recordset::Save appears to be set in stone right now in ADO 2.1.So you
are safe until a beta of the next version of ADO.

Personally, I have struggled with the same problem. I chose the ASP/XMLDOM
route, I did not want to write to disk if I did not have to. Plus with
multiple users, then you have to keep track of these temp files with SESSION
variables, etc. Plus the cost of File I/O as well, as visitors to your web
site increase, performance decreases along with it.

--
Stephen Forte
www.auroradev.com


>I am pulling data from a database, converting it to XML, and rendering it
as
>HTML using XSL.  I seem to have (at least) 2 choices when it comes to
>converting the data to XML
>(1) call Recordset::Save with adPersistXML or (2) use an ASP page and the
>XMLDSO to generate XML.

>The first technique requires I create a disk file for the Save, and I deal
>with the XML the Recordset writes.  With the second technique I can invent
>my own XML document type and the XML never needs touch disk.

>My main reservation about using Recordset::Save concerns the XML document
>format.  Is the Recordset generated XML in documented and fixed format, or
>is it an undocumented/unsupported format likely to change?

>Thanks,
>Ed Schiebel


 
 
 

Persist recordset as XML, or cook XML w/ XMLDSO

Post by 3364 » Sat, 03 Apr 1999 04:00:00


I also agree - avoid the disc method.  It also doesn't support hierarchies,
which is why I wrote my own XML generator.

Dave



> Using Recordset::Save appears to be set in stone right now in ADO 2.1.So
you
> are safe until a beta of the next version of ADO.

> Personally, I have struggled with the same problem. I chose the ASP/XMLDOM
> route, I did not want to write to disk if I did not have to. Plus with
> multiple users, then you have to keep track of these temp files with
SESSION
> variables, etc. Plus the cost of File I/O as well, as visitors to your web
> site increase, performance decreases along with it.

> --
> Stephen Forte
> www.auroradev.com




- Show quoted text -

Quote:> >I am pulling data from a database, converting it to XML, and rendering it
> as
> >HTML using XSL.  I seem to have (at least) 2 choices when it comes to
> >converting the data to XML
> >(1) call Recordset::Save with adPersistXML or (2) use an ASP page and the
> >XMLDSO to generate XML.

> >The first technique requires I create a disk file for the Save, and I
deal
> >with the XML the Recordset writes.  With the second technique I can
invent
> >my own XML document type and the XML never needs touch disk.

> >My main reservation about using Recordset::Save concerns the XML document
> >format.  Is the Recordset generated XML in documented and fixed format,
or
> >is it an undocumented/unsupported format likely to change?

> >Thanks,
> >Ed Schiebel

 
 
 

Persist recordset as XML, or cook XML w/ XMLDSO

Post by Arik Barzila » Wed, 05 May 1999 04:00:00


I'm currently working on a similar project, and having the same problems
(and a few more;-).
I can't use ASP, so i'm building on temporary XML files pushed to the
clients.

1. can I render my dB-data into a specific XML format ?
2. can someone point/send me a good example of using XMLDSO which renders
also subelements & attributes ?

Thanks,
Arik Barzilay.


Quote:> I am pulling data from a database, converting it to XML, and rendering it
as
> HTML using XSL.  I seem to have (at least) 2 choices when it comes to
> converting the data to XML
> (1) call Recordset::Save with adPersistXML or (2) use an ASP page and the
> XMLDSO to generate XML.

> The first technique requires I create a disk file for the Save, and I deal
> with the XML the Recordset writes.  With the second technique I can invent
> my own XML document type and the XML never needs touch disk.

> My main reservation about using Recordset::Save concerns the XML document
> format.  Is the Recordset generated XML in documented and fixed format, or
> is it an undocumented/unsupported format likely to change?

> Thanks,
> Ed Schiebel

 
 
 

1. ADO 2.5 persisting recordset as XML

The problem that I am having is that I can't update the recordset
without wiping out all the previous records, or if I try to save. It
tells me it can't save.

    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.CursorType = adOpenDynamic
    rs.ActiveConnection = Nothing
    rs.Source = "c:\temp\tempdb2.xml"
    rs.LockType = adLockReadOnly
    rs.Open

    dim segTease
    dim video100
    segTease = "adding a new teaser"
    video100 = "http://your.mom.com/"
     rs.AddNew
         rs.Fields("segment_teaser").value = segTease
         rs.Fields("video_url_100").value = video100
     rs.Update

The only record I am being sent back is the one I added. If I put in
     rs.Requery after the update. It shows me the records but with out
the update. If I put in rs.save it tells me can't save. Is it possible
to add a record to a persisted recordset or is the just not doable?
Thanks,
Bryan

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Event ID 17052

3. persisting recordsets to XML

4. Sequence numbering and the Microsoft implementation of insert

5. Problem Persisting Filtered Recordset to XML DOM

6. Test Only!!

7. Modifing structure for a persisted ADO - XML recordset

8. VFP's Form Designer

9. RecordSet Persisted XML missing namespace

10. Help: ADO 2.5 XML works, ADTG doesn't with persisted recordsets

11. Error persisting XML stream to ADO recordset

12. Recordsets persisted in XML

13. Persisting an ADO Recordset with XML in ASP