Microsoft KB Archive/283203

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

Article ID: 283203

Article Last Modified on 9/27/2006

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



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



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:  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.</li> On the Tools menu, point to Macro, and then click Visual Basic Editor.</li> If the Immediate window is not visible, on the View menu, click Immediate Window.</li>  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 </li>  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 </li> Save the page, and then close the Visual Basic Editor.</li> Open the page in Page view in Access. The page should open more quickly.</li></ol>

<div class="status_section">

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

<div class="moreinformation_section">

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.

<ol> Open the sample database Northwind.mdb or the sample project NorthwindCS.adp.</li> In the Database window, click Pages under Objects, and then click New.</li> 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.</li> On the View menu, click Design View.</li> Right-click the page in Design view, and then click Page Properties on the shortcut menu.</li> In the property sheet, click the Data tab.</li> Change the UseXMLData property to True. Verify that the XMLLocation property is set to dscXMLEmbedded.</li> On the Tools menu, point to Macro, and then click Visual Basic Editor.</li> If the Immediate window is not visible, on the View menu, click Immediate Window.</li>  Type the following code in the Immediate window, and then press ENTER: DataAccessPages(0).MSODSC.ExportXML </li> <li>Save the page, and then close the Visual Basic Editor.</li> <li>Open the page in Page view in Access.</li></ol>

Note that it takes a while to open the page.

Additional query words: pra takes a long time slow delay delayed not fast quick

Keywords: kbbug kbdap kbfix KB283203

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.