Databases Reference
In-Depth Information
The traditional way of creating a database-enabled Web application,
such as the telephone directory, is to use CGI scripting. The CGI script is a
program that is referenced by the selection screen. It is invoked by the sub-
mission of the selection criteria (last name and first name) and receives
the selections as input parameters. Once invoked, the CGI script works like
any other program on the server and can access a database server to
retrieve the information that is required. It then builds the dynamic Web
page based on the retrieved data and presents it back to the user on the
Web page.
This approach is lacking in execution speed and requires programming
knowledge in Perl or some other computer language that is used to con-
struct the CGI script. This article describes a database-enabled application
using the Internet Database Connector (IDC) technology. Building this ap-
plication will require no traditional programming skills and relies only on
minimal coding statements.
INTERNET DATABASE CONNECTOR (IDC)
IDC is a technology developed by Microsoft to allow the execution of an
SQL statement against a database and represents the results in an HTML
page format. This technology works only with an Internet Information Serv-
er (IIS), which is a Microsoft Web server offering. Any browser can be used
to access database information using IDC; the only requirement is that the
browser be able to interpret HTML pages. Exhibit 1 depicts the way in
which IDC operates.
In this example, a client machine (e.g., a PC) is running a Web browser.
The browser requests an IDC page, which happens to be a text-based page.
The server intercepts the request and sends the SQL statement included in
the IDC file to the ODBC data source defined in the IDC file. The database re-
turns a result set or performs the insert/update operation. The data re-
turned is formatted, using the format specified in the HTX template, into a
valid HTML stream that is then sent back to the requesting client to be dis-
played by the browser.
In the following sections of this article, this functionality will be demon-
strated by building a simple telephone directory application.
DEVELOPING THE TELEPHONE DIRECTORY APPLICATION
Requirements
This is a small sample application designed for the sole purpose of dem-
onstrating some principles of database access over the Web. The require-
ments are identified in terms of the required functionality and access. The
functionality required is as follows:
Search WWH ::




Custom Search