Using Data Access Pages to Access Data on a SQL Anywhere 10 Database - Creating a Data Access Page (Page 4 of 4 )
In the Main window of the application choose to create a new Data Access Page. Opt for using the Page Wizard. From the drop-down choose the Demo10_Customers Query as shown.

This gets you to the first step of the wizard and since you have already chosen the fields, you shift all of them from Available Fields: area to Selected Fields: area using the >> button. Click on the button labeled Next.

In this second step, you can apply the way you want to group the fields. Highlighting "State" and clicking on the > button will make "State" the first level as shown.

Now highlight and click on "Country" and the > button makes the "Country" the second level as shown.

Of course "Country" should be the first level and "State" should be the second level. You can rearrange the levels by using the UP/DOWN arrows. Now the country and state have been reversed. Click on the button labeled Next.

In the third step of the wizard you can make the sorting orders you wish to impose on the data. Here the "Surname" will be sorted in ascending order as shown.

When you click on the Finish button you will have created a Data Access Page with a page that has been renamed Demo - CUSTOMERS as shown.

The Data Access Page shows up in design as a page with a default name, Page 1 as shown. You may add a heading to the page by clicking and typing in a title. The formatting of this page has been changed in the final displayed page.

The designed page also comes up with a FieldList, the data from the database behind the data access page.

Before you can see the page you have to save it when the SaveAs window shows up, where you change Page 1 to another name you want to use as shown.

When you click on the button labeled OK, you will get to the Save As Data Access Page pointing to the default directory, named My Documents. However since you wish to have intranet access you may choose to save it to the root directory of your intranet site directory , Inetpub/wwwroot as shown.

For the window which shows up next you may provide a suitable answer. Here the No option was used so as not to clutter the intranet site by default.

When you click No to the above you will get the next window, which warns you that the might not be able to connect to the data through the network and that you may need to edit the connection string to specify a UNC network path. Click OK to this as well.

You may now browse the page saved to the intranet site by typing http://localhost/Customers-demo10.htm in the address of your browser.
This next window that comes up warns that the data provider may not be safe. Click on the button labeled OK.

This window that comes up next is rechecking your trust of the web site. Click on the button labeled OK on this window as well.

This brings up the web page Demo10 - Customers.htm as shown. The formatting and styling can be changed by setting the properties of each element of this page. You may also change them in the HTML of the source. For working with the Data Access Pages please refer to the tutorials on data access pages on the ASP Free site.

Summary
Microsoft Access 2003 supports importing tables and objects from a wide variety of sources in addition to ODBC data sources. If an ODBC provider is available for the data source then it is relatively simple to bring in the table or objects to the MS Access application. Creating a data access page and enabling it on the intranet does not require any coding. By default the data source uses the local directory path; if you want it accessible from the network you should indicate a UNC path. This change can be made in the ConnectionString that gets written into the source of the data access page.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |