User Directory Design Model

For instructional purposes, we've elected to make this user directory integrate into a simple database. If an employee's phone number or email address changes, all that needs to be updated in the application is the information in the database.

The database included is a Microsoft Access database. To install this database, follow these steps:

  1. (If you own Microsoft Access and have installed the software, skip to step #3.) Log in to Microsoft's Web site and download the Microsoft Universal Data Access Components (MDAC). This can be found at http://www.microsoft.com/data/download.htm?RLD=377.

  2. Install the MDAC components.

  3. Go into the Windows Control Panel and open up 32-bit ODBC. (Under Windows 2000 it will be located in the Administrative Tools Control Panel subfolder.)

  4. Click the Add button to add a datasource.

  5. Select the database file from the Samples directory.

  6. Where it asks for the Datasource name, enter staffdir.

  7. Click OK to complete the database selection.


The structure of the database consists of two tables. The first table is called Company and is shown in Figure 16.1. It simply lists the companies and applies a unique index to each one.

Figure 16.1. The Company table for the User Directory application created with Microsoft Access.


The second table is called Staff (see Figure 16.2). It provides the dynamic material for the staff members. The information consists of the username, phone number, email address, and a company index that corresponds to an entry in the Company table.

Figure 16.2. The Staff table for the User Directory application created with Microsoft Access.


In this application a WML card interacts with each table to make the code walkthrough simple. It's also designed to work with multiple companies for maximum flexibility.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.218.230