-- 31 --

Using Oracle PowerBrowser to Web-Enable Personal Oracle7 for Windows 95

In recognition of the importance of the Internet, Oracle introduced a Web browser named PowerBrowser. PowerBrowser is available from Oracle (at no charge) for Windows 3.11, Windows 95, and Windows NT. This chapter focuses on using PowerBrowser, version 1.5.01 on Windows 95.

A Very Short History of the World Wide Web

In 1989 Tim Berners-Lee--;a researcher at CERN, a European particle physics laboratory located near Geneva--;developed the concept of a hypertext browser that would provide global access to information to scientists interested in high-energy particle physics. He named this global network the World Wide Web or WWW. In 1993 a group of programmers at a facility affiliated with the University of Illinois released a World Wide Web browser with a graphical user interface: Mosaic. A version of this browser was available for UNIX, Windows, and the Mac.

The World Wide Web consists of servers that host Web pages or documents. Each Web page consists of a file written in a language called HyperText Markup Language or HTML. A browser user specifies an address that describes the server to be accessed, the type of access, and the name of the file or service to be provided. This address is called a uniform resource locator or URL. A useful URL for the readers of this book is http://www.oracle.com--;the Oracle Corporation Web site.

A URL is composed of several parts. The first portion specifies the type of service to be accessed. Several common services are

PowerBrowser: A Web Browser and Server

Here are a few facts about PowerBrowser version 1.5.01:

Installing PowerBrowser

To get the most out of PowerBrowser, you should install the following four files:

Installing PowerBrowser

To start, run the program ORAPB95.EXE. The default directory for PowerBrowser is C:\ORAPB95. (See Figure 31.1.)

Figure 31.1. PowerBrowser is installed in C:\ORAPB95.

After all the PowerBrowser files have been installed, PowerBrowser asks if you want to add an icon for the program to a program group named Oracle Internet. (See Figure 31.2.)

Figure 31.2. PowerBrowser creates a program group and icon.

That's it! PowerBrowser is installed. (See Figure 31.3.)

Figure 31.3. PowerBrowser is successfully installed.

When you invoke PowerBrowser from the Oracle for Internet program group, PowerBrowser prompts you for the setup. Choose the Generic Setup. (See Figure 31.4.)

Figure 31.4. PowerBrowser: Choosing the Generic Setup.

Next, PowerBrowser displays a window in which you enter your user ID, full name, and e-mail address. (See Figure 31.5.) Enter the appropriate values and click OK.

Figure 31.5. PowerBrowser prompts for user ID, full name, and e-mail address.

PowerBrowser then asks if you want to fine-tune your preferences as they have been configured. (See Figure 31.6.) Click No--;you can always change them at a later time.

Figure 31.6. PowerBrowser asks if you want to change the preferences.

Installing the PowerBrowser Help File

The next component to install is the help file for PowerBrowser. Run the program ORAPBHLP.EXE. The default directory for the help file--;named PB.HLP--;is C:\ORAPB95. (See Figure 31.7.)

Figure 31.7.Specifying the directory for the PowerBrowser help file.

After you have specified the directory and clicked OK, Oracle displays a successful installation message. (See Figure 31.8.)

Figure 31.8. PowerBrowser help file is successfully installed.

Installing the PowerBrowser Demonstration System

PowerBrowser has two demonstrations--;Mirage and a survey. To install them, run OPBDEMO.EXE. The default directory for the demonstration system is C:\ORAPB95. (See Figure 31.9.)

Figure 31.9.Specifying the directory for the PowerBrowser demonstrations.

After you specify the directory and click OK, PowerBrowser tells you that the demonstrations were installed successfully. (See Figure 31.10.)

Figure 31.10. Successful installation of the PowerBrowser demonstrations.

Installing the 32-Bit ODBC Oracle Driver

The 32-bit open database connectivity (ODBC) Oracle driver (a Microsoft driver standard for communicating with databases) allows you to query your Personal Oracle7 database from an HTML document. To install the ODBC driver, run the Setup program. The Oracle Installer prompts you for a language. (See Figure 31.11.) Specify the correct language and click OK.

Figure 31.11. Oracle Installer prompts you for a language.

Next, the Installer asks you to supply a company name and the Oracle Home directory. By default, you should specify C:\ORAWIN95 as Oracle Home. (See Figure 31.12.)

Figure 31.12. Specifying a company name and Oracle Home directory.

The Installer Software Asset Manager displays a window containing the products that can be installed on the left and the products that are already installed on the right. Select the Oracle ODBC driver from the left side of the screen and click Install. (See Figure 31.13.)

Figure 31.13. Selecting the Oracle ODBC driver for installation.

The ODBC driver now appears on the right side of the screen in the list of installed products. Click Exit to terminate the Installer, and the Installer message tells you that the driver installation is complete. (See Figure 31.14.)

Figure 31.14. The Oracle Installer has completed the installation of the ODBC driver.

The Installer will create icons for the following elements:

Creating an ODBC Data Source for the Personal Oracle7 Database

The 32-bit Administrator is a program that allows you to add, modify, or delete an ODBC data source. To run this program, press Start | Programs | Oracle for Windows 95 | 32-bit Administrator. The existing 32-bit ODBC data sources appear in a window titled Data Sources. (See Figure 31.15.) Click Add to add the Personal Oracle7 database as a data source.

Figure 31.15. The 32-bit ODBC Administrator displays data sources.

Select the Oracle72 driver from the window titled Add Data Source and then click OK. (See Figure 31.16.)

Figure 31.16. Adding a 32-bit ODBC data source based on the Oracle driver.

The next step is to specify a name for the data source and the SQL*Net connect string. As an example, you can type in Frayed Wires as the data source and use 2: as the SQL*Net connect string, signifying that the Oracle database is local. (See Figure 31.17.)

Figure 31.17. Specifying the Oracle7 ODBC data source.

After you click OK, the new ODBC data source appears in the list of available data sources. (See Figure 31.18.)

Figure 31.18. List of ODBC data sources includes the new Personal Oracle7 data source.

Testing the Personal Oracle7 ODBC Data Source

The 32-bit ODBC Test program allows you to test the accessibility of an ODBC data source. To run this program, select Start | Programs | Oracle for Windows 95 | 32-bit ODBC Test. The window shown in Figure 31.19 will appear.

Figure 31.19. Initial window displayed by 32-bit ODBC Test program.

Click Connect to connect to the ODBC data source for Personal Oracle7. Select the appropriate data source from the window titled SQL Data Sources (see Figure 31.20) and click OK.

Figure 31.20. Selecting a SQL data source for the 32-bit ODBC Test.

At the appropriate prompts, specify the Oracle username and password to be used for the data source (see Figure 31.21) and click OK.

Figure 31.21. Specifying the Oracle username and password for the ODBC data source.

In the small window below the Connect button, type in select * from repair_header and click Execute. (See Figure 31.22.) If everything has been configured properly, you should see the rows from the Repair Header table.

Figure 31.22. Retrieving rows from the ODBC data source for the Personal Oracle7 database.

Running PowerBrowser

When you first invoke PowerBrowser, the program starts in Browser mode. You can specify the URL that you wish to browse in the URL field. In the lower-left corner of the browser main window, PowerBrowser maintains a list of the most recently accessed URLs. In the upper-left corner of the browser main window, you can access the bookmarks--;the URLs that you want to save for revisiting on a regular basis. Both of these areas are frames, and you can resize them to your liking.

You can configure PowerBrowser by selecting Options | Preferences from the menu. You will see a series of tab folders that categorize the preferences: Proxies, User, Cache, Helpers, Timeouts, and Security. For example, you would select the Proxies tab if you want to specify your SMTP and NNTP servers. (See Figure 31.23.)

Figure 31.23.Specifying the SMTP and NNTP servers.

The User tab is where you designate information about you as a user. For example, you can change your e-mail account from this tab. (See Figure 31.24.)

Figure 31.24.Specifying your e-mail account.

You can use the Security tab to enable or disable various services, such as the ability to run a Java applet.

Starting and Stopping the Server

The PowerBrowser user interface runs in two modes: Browser mode or Server mode. (Recall that PowerBrowser starts in Browser mode.) To switch to Server mode, click Server on the PowerBrowser toolbar. To start PowerBrowser's HTTP server, click Server on the PowerBrowser toolbar and then click the Start icon, which resembles a green signal light. To stop the server, click the Stop icon--;the red signal light. To return to Browser mode, click Browser on the toolbar.

Creating a New HTML File with PowerBrowser



Note

If you're interested in learning HTML, countless resources are available to you. One book that you should consider reading is Laura Lemay's Teach Yourself Web Publishing with HTML, published by SAMS.net.


To create a new HTML file, click Server on the PowerBrowser toolbar. When you install PowerBrowser, it automatically creates a subdirectory under the Server directory with your username. You can invoke the Home Page Authoring Wizard by pressing the HTML File icon. In the displayed form, you must enter a minimum of three fields: your full name, your e-mail address, and a personal greeting. (See Figure 31.25.)

Figure 31.25. Specifying information for the Home Page Authoring Wizard.

After you enter the information into these fields, click the Save Home Page Using Wizard button. (See Figure 31.26.)

Figure 31.26. Saving the home page generated by the Home Page Authoring Wizard.

At this point, the Home Page Authoring Wizard generates a file named index.htm, which is stored in your username directory beneath the Server directory. This HTML page is labeled Personal Home Page of <username> where <username> is the username that you specified when configuring PowerBrowser.

While the PowerBrowser is in Server mode, the left side of the main window displays the HTML files that exist in your username directory. You can preview an HTML file by selecting it and right-clicking View. PowerBrowser displays the HTML document as it will appear in a browser. You can also edit an HTML file by selecting it and right-clicking Edit. PowerBrowser then allows you to edit the file and save your changes. You can delete an HTML file by selecting it and right-clicking Delete.

How Internet Users Can Access Your HTML Documents

Because PowerBrowser is an HTTP server, you can use it to give Internet users access to the HTML documents on your PC. To access an HTML document on your PC, an Internet user specifies a URL that incorporates a reference to your PC. That reference will be either an IP address or a host and domain name, depending on how your PC is connected to the Internet.

If you're using an Internet service provider (ISP), then you'll need to determine what IP address you have been assigned. You can obtain this information by running winipcfg. An Internet user would then use http://<IP-address>:80/index.htm to access your home page where <IP-address> is the IP address displayed by winipcfg. Be aware that your ISP may assign IP addresses dynamically; that is, the IP address you are assigned for a given connection may not be the same IP address that you are assigned for the next connection.

If you have a direct Internet connection, then a user can use your PC's host and domain names to access your HTML documents. In that case an Internet user would use http://<host-domain-names>:80/index.htm to access your home page where <host-domain-names> are the host and domain names that have been assigned to your machine. You can obtain these values by looking at the Network folder in the Control Panel and inspecting the properties for the TCP/IP Protocol. You must have a Domain Name Server (DNS) enabled to specify a host and domain name.

Creating a Query with Database Wizard

To create a new query, you need to switch to the server by clicking Server from the toolbar. You can tell that you're in Server mode because the PowerBrowser title will be Oracle PowerBrowser - [Personal Server]. From the toolbar, click Query. Select the data source that you created for the Personal Oracle7 database from the list of available SQL data sources (see Figure 31.27) and click OK.

Figure 31.27. Specifying a SQL data source for the PowerBrowser Database Wizard.

Next, Oracle prompts you for a username and password. Enter the appropriate values and click OK. (See Figure 31.28.)

Figure 31.28. Specifying the Oracle username and password for the PowerBrowser Database Wizard.

PowerBrowser's Database Wizard now displays the tables that are available for the query. Select the table you want to query and click Next. (See Figure 31.29.)

Figure 31.29. Selecting a table to query for the PowerBrowser Database Wizard.

From the next window select whichever columns (or none) you want the user to be able to search and then click Next. (See Figure 31.30.) If you don't specify any columns for search criteria, the generated HTML form will not initially contain any fields.

Figure 31.30. Identifying columns to be used for search criteria.

The next Database Wizard window lists the selected table's columns. Select the columns that you want to display in the Database Wizard[nd]generated HTML form and click Next. (See Figure 31.31.)

Figure 31.31. Identifying columns to be included in the generated HTML form.

Finally, Database Wizard displays a window that contains three fields, as shown in Figure 31.32:

Figure 31.32. Database Wizard prompts for the form name, form heading, and result set heading.

Specify a value for each field and click Next. Database Wizard generates three files:

The completed HTML form appears in Figure 31.33. *



Note

The Oracle Basic used in the SCR file is the same language that is used in Oracle Power Objects. For more information on Oracle Basic, please refer to the Oracle Power Objects documentation or to Teach Yourself Oracle Power Objects in 21 Days from Sams Publishing.


Figure 31.33. HTML query form generated by the Database Wizard.

To execute this HTML document, a user specifies the URL for the HTML file as shown in Figure 31.34. Clicking the Submit Query button retrieves the information from the Repair Header table from the Personal Oracle7 database. (See Figure 31.35.)

Figure 31.34. Using a URL to access an Database Wizard[nd]generated HTML query form.

Figure 31.35. Query results displayed by the HTML query form.

Limitations on the Use of PowerBrowser for Providing Access to a Personal Oracle7 Database

Although PowerBrowser has some very desirable features, it is somewhat limited in its ability to provide Internet access to a Personal Oracle7 database. First, to provide Internet access to a Personal Oracle7 database running on a Windows 95 PC, several conditions must exist:

For many users maintaining this environment simply isn't practical. In particular, if you are using an ISP, the cost of maintaining a permanent Internet connection might be prohibitive. However, PowerBrowser could be used effectively on an intranet.

Even if you can satisfy these conditions, I would strongly urge you to consider using another Oracle product: Webserver. You can use Webserver with the Oracle Universal or Workgroup Server to provide Web access to an Oracle database. Webserver also functions as an HTTP server, but it differs from PowerBrowser in a significant way: instead of using HTML and Oracle Basic to access an Oracle database, Webserver uses PL/SQL to dynamically generate HTML output. Also, Webserver offers a variety of security schemes for restricting access to an Oracle database.

Summary

This chapter addresses the features of PowerBrowser: