Microsoft Knowledge Base Email Alertz

In Access 2002, you can bind a data access page to XML embedded in the page or to an external XML file. Embedded XML is also referred to as an XML data island. If you open a page that is bound to a large XML data island, it may take a while for the

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 283203 - Last Review: September 27, 2006 - Revision: 3.1

ACC2002: Data Access Page That Contains Embedded XML May Open Slowly

This article was previously published under Q283203
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

On This Page

SYMPTOMS

In Access 2002, you can bind a data access page to XML embedded in the page or to an external XML file. Embedded XML is also referred to as an XML data island. If you open a page that is bound to a large XML data island, it may take a while for the page to open.

RESOLUTION

Instead of binding the data access page to an XML data island, use an external XML file to bind the page to. In addition, you may need to remove the XML data island from the page. To do so, follow these steps:
  1. Start Access 2002, and then open your data access page in Design view.
  2. Right-click the page in Design view, and then click Page Properties on the shortcut menu.
  3. In the property sheet, click the Data tab.
  4. Change the XMLLocation property to dscXMLDataFile.
  5. Verify that the UseXMLData property is set to True.
  6. In the XMLDataTarget property, type the name of a local XML file to save to, for example, MyXMLData.xml. If you do not enter a full path in this property, the XML file will be saved to the same folder as the page.
  7. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  8. If the Immediate window is not visible, on the View menu, click Immediate Window.
  9. To remove the existing XML data island from the page, type the following code in the Immediate window, and then press ENTER:
    DataAccessPages(0).Document.all.DSCXMLData.removeNode
  10. To create the file specified in XMLDataTarget property and to bind the page, type the following code in the Immediate window, and then press ENTER:
    DataAccessPages(0).MSODSC.ExportXML
  11. Save the page, and then close the Visual Basic Editor.
  12. Open the page in Page view in Access. The page should open more quickly.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

  1. Open the sample database Northwind.mdb or the sample project NorthwindCS.adp.
  2. In the Database window, click Pages under Objects, and then click New.
  3. In the New Data Access Page dialog box, click AutoPage: Columnar, click Invoices in the Choose the table or query where the object's data comes from box, and then click OK.
  4. On the View menu, click Design View.
  5. Right-click the page in Design view, and then click Page Properties on the shortcut menu.
  6. In the property sheet, click the Data tab.
  7. Change the UseXMLData property to True. Verify that the XMLLocation property is set to dscXMLEmbedded.
  8. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  9. If the Immediate window is not visible, on the View menu, click Immediate Window.
  10. Type the following code in the Immediate window, and then press ENTER:
    DataAccessPages(0).MSODSC.ExportXML
  11. Save the page, and then close the Visual Basic Editor.
  12. Open the page in Page view in Access.
Note that it takes a while to open the page.

APPLIES TO
  • Microsoft Access 2002 Standard Edition
Keywords: 
kbbug kbdap kbfix KB283203
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate