ADO 2.5 persisting recordset as XML 
Author Message
 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://www.***.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.***.com/
Before you buy.



Sun, 03 Nov 2002 03:00:00 GMT
 ADO 2.5 persisting recordset as XML

I can open a recordset from the database and save it in XML using
rs.Save c:\whatever, 1

However when I reopen the recordset from the file and then try to
do an update and save. With rs.Save it changes the format from XML
to ADTB, I tried rs.PersistFormat = 1 but this doesn't work. If I try
to save it again with the same file name I also get an error. Can
someone please tell me how to open and close an XML file as a recordset.


Quote:

> 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.

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


Sun, 03 Nov 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

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

2. ADO 2.5 persisting a recordset as XML

3. Opening a recordset from a Persisted XML Stream Object (ADO 2.5)

4. Problems persisting ADO 2.5 recordset using Jet.OLEDB.40

5. Problems persisting ADO 2.5 recordset using Jet.OLEDB.40

6. Modifing structure for a persisted ADO - XML recordset

7. Error persisting XML stream to ADO recordset

8. Persisting an ADO Recordset with XML in ASP

9. Modifing structure for a persisted ADO - XML recordset

10. ADO 2.5 Recordset to XML

11. Persist recordset as XML, or cook XML w/ XMLDSO

12. persisting recordsets to XML


 
Powered by phpBB® Forum Software