XML
  Home arrow XML arrow Page 2 - Displaying ADO Retrieved Data with XML Isl...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Displaying ADO Retrieved Data with XML Islands
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2006-09-06

    Table of Contents:
  • Displaying ADO Retrieved Data with XML Islands
  • Extracting XML formatted data example
  • The Saved XML file
  • Reviewing the saved file
  • Data types in Access 2003 and XML file
  • Displaying retrieved XML in an HTML document
  • Creating an HTML document which can display the XML Data

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Displaying ADO Retrieved Data with XML Islands - Extracting XML formatted data example


    (Page 2 of 7 )

    Using the save() method of ADO, you could save the recordset to a file as shown in the next paragraph. The recordset is created by accessing an MDB file on the hard drive. Not all the columns in the 'Employees' table in the Northwind database will be saved as an XML file. The variable fileName points to the location on the hard drive where the XML file will be saved.

    Create UI to test code

    On a form in your MS Access application add a button, and to the click event of this button add the following code. The statement

    rs.save fileName, adPersistXML >

    can also be saved as

    rs.save fileName2, adPersistADTG

    where fileName2 will have an .adtg extension. This is yet another proprietary format called the Advanced Data TableGram format. We will only look at the persisted XML formatted file.

    Private Sub Command0_Click()
    Dim rs As New ADODB.Recordset
    fileName = "C:NwindEmployees.xml"
    rs.Open "Select * from Employees where LastName='Peacock'", _
    "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=C:Documents and SettingsJayMy DocumentsRetrieve.mdb;" & _
    "Persist Security Info=False", adOpenKeyset, adLockOptimistic, 
    adCmdText
    If Dir$(fileName) <> "" Then Kill fileName
    rs.Save fileName, adPersistXML
    End Sub

    In the above code the recordset for the indicated SQL statement will be saved.

    More XML Articles
    More By Jayaram Krishnaswamy


       · ADO was indeed a milestone in Microsoft's data access technology. It replaced the...
     

    XML ARTICLES

    - Using Regions with XSL Formatting Objects
    - Using XSL Formatting Objects
    - More Schematron Features
    - Schematron Patterns and Validation
    - Using Schematron
    - Datatypes and More in RELAX NG
    - Providing Options in RELAX NG
    - An Introduction to RELAX NG
    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek