3.    Create ODBC Data Source

Open Database Connectivity (ODBC) is the means by which programmes can communicate with a database.  In the case of the Feedback site, ODBC is used to insert new records and to query the database to display records based on certain parameters.

Creating the ODBC data source is quite straight forward but you have to be aware of a few things.  To create the data source :

A. Open 32-bit ODBC Data Source Admin
Open the Control Panel in the Web Server.  Yes, it has to be on the Web Server because the Web Engine will use the ODBC to communicate with the database.   Double-click the 32-bit ODBC icon to open the ODBC Data Source Administrator.   This ODBC may have been loaded when IIS was installed or it will be loaded when you install MS Access 97.

odcb.jpg (4744 bytes)

B. System DSN Tab
You will see a dialog as shown on the right.  Select the System DSN tab.  Note that the example shows an existing data source with the name "WebFeedback" which was created for the HBP Feedback Site.  If you are using IIS on Windows NT, you have to set up a System DSN (Data Source Name).  The User DSN will not work in this situation.

ODCBAdmin.JPG (71136 bytes)
ODBC Administrator

C. Create New Data Source
Click the Add button.  The Create New Data Source dialog box will appear (see right).  Select Microsoft Access Data and click Finish.

ODCBNewDataSource.JPG (91573 bytes)
Create NewData Source

D. ODBC Microsoft Access 97 Setup
A new dialog called "ODBC Microsoft Access 97 Setup" will appear for you to create the new data source.  In the first box, labelled "Data Source Name", type "WebFeedback" (without quotes) and type a description if you like.  It is this name which is used later when we create the homepage files and specify the source of the data.

ODCBSetup.JPG (56051 bytes)
ODBC MS Access Setup

The critical information in the DSN is actually the database name and its location.  Click the "Select" button under "Database" and browse to the location of the HBPWebFeedback.mdb file created earlier.  Since we are using the systems workgroup you don't have to worry about the System Database (leave the selection as "none").  Click OK and you have created the ODBC Data Source.  You should now see the ODBC Administrator with the "WebFeedback" entry in the System DSN tab.
The "WebFeedback" System DSN points to the HBPWebFeedback.mdb Database and not to specific tables in the database.  Hence, you could have multiple tables in the database and still use the same DSN.  This will be discussed in more complex database structures elsewhere.

The next sections deals with the Feedback Form.

Copyright Lee Lik Meng. All rights reserved.
Revised: February 19, 2004.