[AccessD] Link to XML File

MartyConnelly martyconnelly at shaw.ca
Fri Apr 25 02:10:18 CDT 2003


 You could read in xml file  as an ADO stream

Dim rs as new Recordset
Dim rs2 as new Recordset
Dim c as new Connection
Dim s as new Stream

' Query the Titles table.
c.Open "provider=sqloledb;data source=mydb;initial catalog=pubs;user 
id=sa;password="
rs.cursorlocation = adUseClient
rs.Open "select * from titles", c, adOpenStatic

' Save to the file in the XML format. Note that if you don't specify
' adPersistXML, a binary format (ADTG) will be used by default.
rs.Save "titles.sav", adPersistXML

' Save the Recordset into the ADO Stream object.
rs.save s, adPersistXML
rs.Close
c.Close

set rs = nothing

' Reopen the file.
rs.Open "titles.sav",,,,adCmdFile
' Open the Stream back into a Recordset.
rs2.open s

Rudolf F. Vanek wrote:

> Hi,
>
> Is there a way I can link via code to an external XML File.
>
> Access XP!
>
>  
>
>  Thanks
>
>  
>
> Rudolf F. Vanek
>
>  
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>  
>




More information about the AccessD mailing list