Using Microsoft Script Editor for Data Access Pages - Creating a Data Access Page
(Page 2 of 5 )
Connecting to a data source
An earlier tutorial showed you how to create a data access page from scratch. The emphasis in this tutorial is different. Open the MS Access program from Start -->All Programs. In MS Access click on File-->New. In the New File Window click on the Blank data access page...link. Since a DAP is used for data access, the Select Data Source Window will open, showing existing data sources. There are a couple of sources in this window, as shown in Fig.1.
Fig.1
Since you will be creating a new page, click on the New Source... button. This will take you to the Welcome to the Data Connection Wizard section of the Data Connection Wizard as shown in Fig.2. From here you can branch off to connect to an SQL Server (even MSDE should be fine), or other types of sources. Since this page will look for the Northwind.mdb, highlight Other/advanced and click Next>.
Fig.2
This will take you to the Data Link Properties window with the Provider tab in view as in Fig.3. Highlight Microsoft Jet 4.0 OLE DB Provider and then click Next>>. You only need to interact with the Provider and Connection tabs.
Fig.3
Click on the ellipsis ... button referenced by the Select or enter database name: label and browse to the sample Northwind.mdb file. This should be present in your Office folder. This will automatically fill in the other information. You may also test the connection as shown in Fig.4. Now you are set, since the connection is OK. Never mind the Japanese character in the image that has leaked in place of "/".
Fig.4
Clicking the OK button will take you to the Select Database and Table step (not shown here) of the Data Connection Wizard. It shows everything in that mdb file. Clicking Next will take you to the Save Data Connection and Finish step of the Data Connection Wizard. Here you give a File Name: to the Data Connection. Here it is DAP101.odc as shown in Fig.5. Give some description, and some keywords for search. Click Finish.
Fig.5
Now your previous Select Data Source Window will appear with the DAP101.odc file as shown in Fig.6. Now click Open.
Fig.6

Next: First look at the DAP design environment >>
More Microsoft Access Articles
More By Jayaram Krishnaswamy