HOW TO: Work with Data Access Pages Offline in Access 2002 (285331)



The information in this article applies to:

  • Microsoft Access 2002

This article was previously published under Q285331
Advanced: Requires expert coding, interoperability, and multiuser skills.

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

IN THIS TASK

SUMMARY

Access 2002 introduces a new feature that allows you to work with data access pages offline. This feature is useful when you are unable to connect to your network, but still need access to data. Offline data access pages may be updateable if you use an Access project (.adp) and the Microsoft SQL Server Desktop Engine installed locally.

You can also take a data access page that is bound to a Jet table or query in an Access database (.mdb) offline with little configuration. This creates a read-only page bound to XML. The steps for this are outlined in the "Taking Jet Data Offline" section later in this article.

This article outlines the steps involved in taking a data access page offline. The article assumes that you have a SQL Server properly configured for replication, and that you have already created at least one publication. Furthermore, in order to work with offline pages in Microsoft Internet Explorer, the page must be opened from an HTTP location. Therefore, this article also assumes that you have a properly configured Web server to save the page.

The following are the overall requirements for working with data access pages offline when you are using an Access project.

back to the top

System Requirements

  • SQL Server Desktop Engine installed on the client computer.
  • SQL Server database containing a single named publication. This must be a merge publication that can consist of any number of articles. The publication must allow anonymous subscriptions in order to work with the page offline.
  • Properly configured Web server to view pages using HTTP.
  • The page must be configured for offline use. For details, see the "Configuring an Offline Data Access Page" section later in this article.
  • Contain filter restrictions to reduce the amount of data moved to the client (optional)
  • Internet Explorer 5 or later to view the page.
back to the top

Configuring an Offline Data Access Page


After your SQL Server is configured for replication, you can create the data access page using the publication created. To create the page and work with it offline, follow these steps.
  1. Start Microsoft Access, and then create a new Access project (.adp) that is bound to a SQL Server configured for replication.
  2. Create a new data access page that is bound to an article in the publication. Typically, this will be a table, a view, or a stored procedure.
  3. View the page in Design view.
  4. Right-click the page, and then click Page Properties.
  5. Change the OfflineType property to dscOfflineMerge.
  6. In the OfflinePublication property, select the name of the publication that you created. The property displays a list of publications that allow anonymous subscriptions. Note that the OfflineSource property is populated with an ADO connection string pointing to (local) for the data source.
back to the top

Taking the Page Offline

After you have created the page and saved it to a Web server, follow these steps to work with the page offline:
  1. Open your data access page by using the HTTP protocol in Internet Explorer 5 or later.
  2. On the Favorites menu, click Add to Favorites.
  3. Click to select the Make available offline check box, and then click OK.
  4. Click Work Offline on the File menu to take the page offline. You can then work with the page offline. If you want to synchronize your page after you have reconnected to your network, click Synchronize on the Tools menu. Make sure that the page is selected under Offline Web Pages, and that the publication is selected under Offline Web Pages: Data.
back to the top

Taking Static Jet or SQL Data Offline

For cases where you do not require data to be updateable, data access pages that are bound to a table or a query in an Access database (.mdb) or a project (.adp) can also be taken offline. In this scenario, the page is bound to XML and is read-only.

back to the top

Configuring the Data Access Page

  1. Create a new data access page that is bound to a table or a query in an Access database.
  2. View the page in Design view.
  3. Right-click the page, and then click Page Properties.
  4. Make sure that the OfflineType property is set to dscOfflineXMLDataFile.
  5. Save the page to the Web server.
back to the top

Taking the Page Offline

After you have created your page and saved it to a Web server, follow these steps to work with the page offline:
  1. Open your data access page using the HTTP protocol in Internet Explorer 5 or later.
  2. On the Favorites menu, click Add to Favorites.
  3. Click to select the Make available offline check box, and then click OK.
  4. Click Work Offline on the File menu to take the page offline. You can then work with the page offline. In this case, the page creates an XML file in Temporary Internet Files (cache) with the name in the OfflineSource property. By default, this file name is [PageName]_Data.xml, where [PageName] is the name of your page.
back to the top


REFERENCES

For more information about SQL Server replication, see "SQL Server Books Online" at the following Microsoft Web site: For more information about working with data access pages offline, see to the following topic in the MSDN online library at the following Microsoft Web site:

back to the top








Modification Type:MinorLast Reviewed:9/27/2006
Keywords:kbDAP kbhowto kbHOWTOmaster KB285331 kbAudITPro