Microsoft KB Archive/304324

= How to change the connection string for an Access 2002 data access page =

Article ID: 304324

Article Last Modified on 8/12/2004

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q304324



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access database (.mdb).

IN THIS TASK
SUMMARY
 * Correct Examples of Connection Strings
 * Incorrect Examples of Connection Strings
 * Steps to Change the Connection in Access
 * Steps to Change the Connection in FrontPage
 * Steps to Change the Connection in NotePad

REFERENCES



SUMMARY
This article shows you the proper format for connection strings when you deploy data access pages. The path in the connection string must point to a database that can be seen from the Web server. This article also shows you some connection strings that are not in the proper format. It then shows you how to change the connection strings in Microsoft Access, in Microsoft FrontPage, and in Notepad.

back to the top

Correct Examples of Connection Strings

 * \\OtherServerName\SharedFolder\Database.mdb
 * C:\FullPathToDatabase\Database.mdb

back to the top

Incorrect Examples of Connection Strings

 * http://myserver.com/database.mdb
 * C:\IPAddress\database.mdb
 * Server.MapPath/databases/database.mdb
 * ftp://myFTP.com/database.mdb

back to the top

Steps to Change the Connection in Access

 * 1) NOTE: If you change the path in Access, you may change properties such as UseRemoteProvider.


 * 1) Start Access.
 * 2) If the Task Pane is not displayed, point to Toolbars on the View menu, and then click Task Pane.
 * 3) In the Task Pane, click More files.
 * 4) Click the arrow in the Files of Type box, and then click Web Pages(*.html;*.htm;*.hta;*.asp).
 * 5) Browse to the data access page, click it, and then click Open.
 * 6) If the field list is not displayed, click Field List on the View Menu.
 * 7) At the top of the field list pane, right-click the Database icon, and then click Connection.
 * 8) On the Connection tab, click the Ellipsis button (...) under Select or enter a database name to browse to the correct database. You can also just edit the path to connect to the correct database.
 * 9) Click OK.
 * 10) Quit Access. Click Yes when you are prompted to save the changes.

back to the top

Steps to Change the Connection in FrontPage

 * 1) Start FrontPage.
 * 2) On the File menu, click Open.
 * 3) Browse to the data access page, click the data access page, click the arrow next to the Open button, and then click Open in Microsoft FrontPage.
 * 4) At the lower left of the window, click the HTML tab.
 * 5) On the Edit menu, click Find.
 * 6) Type data source in the Find What box.
 * 7) Click Find Next to locate Data Source=(path)\(database).mdb.
 * 8) Edit the path to connect to the correct database.
 * 9) Quit FrontPage. Click Yes when you are prompted to save the changes.

back to the top

Steps to Change the Connection in NotePad

 * 1) Start NotePad.
 * 2) On the File menu, click Open.
 * 3) Click the arrow in the Files of Type box, click All Files, and then browse to the data access page.
 * 4) Click the page, and then click Open.
 * 5) On the Edit menu, click Find.
 * 6) Type data source in the Find What box.
 * 7) Click Find Next to locate Data Source=(path)\(database).mdb.
 * 8) Edit the path to connect to the correct database.
 * 9) Quit NotePad. Click Yes when you are prompted to save the changes.

back to the top

