Microsoft KB Archive/281895

= ACC2002: When You Change the XML Location from Embedded to Data File, the Embedded XML Remains Part of the Data Access Page =

Article ID: 281895

Article Last Modified on 9/27/2006

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q281895



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
By using the new properties of the data source control, you can bind a data access page to XML data that is embedded within the data access page or in a separate XML file. Embedded XML is also known as a data island. If you bind the page to an XML data island and subsequently bind the page to a separate file, the data island remains part of the page.



CAUSE
This behavior is by design. This functionality enables you to switch between two separate XML data sources very quickly.



Steps to Reproduce the Behavior
 Open the Northwind Sample database, and then create a new data access page in Design View. In the field list, expand the Customers table. Add the CustomerID, CompanyName, and ContactName fields from the Customers table to the page. Right-click the Header: Customers section, and then click Page Properties. Click the Data tab, and then change the UseXMLData property to True. Save the data access page.</li> Press CTRL+G to open the Immediate Window.</li>  Type the following code in the Immediate Window, and then press ENTER: DataAccessPages(0).MSODSC.ExportXML This code creates XML embedded within the page and binds the page to this XML. You can view the embedded XML in the browser by clicking Source on the View menu in Microsoft Internet Explorer. </li> Return to the data access page in Design View.</li> Change the XMLLocation property to dscXMLDataFile.</li> Change the XMLDataTarget property to C:\[ ]_Data.xml where  is the name of your data access page.</li> Repeat steps 7 and 8. This binds the page to the XML file that you specified in step 11. Note that if you view the source for the page, the embedded XML is still present.</li></ol>

Additional query words: prb

Keywords: kbdap kbprb KB281895

-

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

© Microsoft Corporation. All rights reserved.