|
 |
 |
 |
 |
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 SlowlyThis 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).
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.
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:
- Start Access 2002, and then open your data access page in Design view.
- Right-click the page in Design view, and then click Page Properties on the shortcut menu.
- In the property sheet, click the Data tab.
- Change the XMLLocation property to dscXMLDataFile.
- Verify that the UseXMLData property is set to True.
- 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.
- On the Tools menu, point to Macro, and then click Visual Basic Editor.
- If the Immediate window is not visible, on the View menu, click Immediate Window.
- 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 - 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 - Save the page, and then close the Visual Basic Editor.
- Open the page in Page view in Access. The page should open more quickly.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. Steps to Reproduce the BehaviorCAUTION: 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. - Open the sample database Northwind.mdb or the sample project NorthwindCS.adp.
- In the Database window, click Pages under Objects, and then click New.
- 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.
- On the View menu, click Design View.
- Right-click the page in Design view, and then click Page Properties on the shortcut menu.
- In the property sheet, click the Data tab.
- Change the UseXMLData property to True. Verify that the XMLLocation property is set to dscXMLEmbedded.
- On the Tools menu, point to Macro, and then click Visual Basic Editor.
- If the Immediate window is not visible, on the View menu, click Immediate Window.
- Type the following code in the Immediate window, and then press ENTER:
DataAccessPages(0).MSODSC.ExportXML - Save the page, and then close the Visual Basic Editor.
- 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
| 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
|
 |
 |
 |
 |
 |
 |
 |
| |