0957-0961

Previous Table of Contents Next

Page 957

CHAPTER 40

Introduction to Oracle Objects for OLE

IN THIS CHAPTER

  • Components of OO4O 958
  • OO4O and the Open Database Connectivity API 960
  • Host Environments 961

Page 958

Oracle Objects for OLE (OO4O) is a product designed to simplify access to data stored in Oracle databases from any development tool and application that supports the Microsoft OLE automation and ActiveX technology in the Microsoft Windows environments (MS Windows 3.1, 95, NT 3.x and 4.x). Such applications include Visual Basic, Delphi, Excel, and Internet
Information Server (IIS), to name a popular few.

This chapter provides a brief description of the components of OO4O. The two chapters that follow present a more detailed discussion of these components and are designed to introduce the key features of the product and provide tips on using OO4O effectively.

Components of OO4O

Oracle Objects for OLE consists of an in-process Automation Server, a C++ class library, and the Oracle data control.

The Automation Server implements a set of OLE automation interfaces/objects for connecting to Oracle database servers, executing SQL statements and PL/SQL blocks, and managing the results.

The C++ class library contains a set of C++ classes that provide object-oriented access to relational data stored in Oracle databases.

The Oracle data control is an OLE control (OCX) that is designed to simplify the exchange of data between an Oracle database and visual controls such as edit, text, list, and grid controls in Visual Basic.

Figure 40.1 illustrates the software layers that make up the OO4O product.

The In-Process Automation Server

OO4O OLE Automation Server provides key features for efficiently and easily accessing Oracle database servers in environments ranging from the typical two-tier client/server applications (developed in Visual Basic or Excel, for example) to application servers deployed in n- tier environments and Web servers, such as IIS or the Microsoft Transaction Server (MTS). The features include

  • Full support for the Oracle PL/SQL language
  • Powerful query result set management
  • Array insert, update, and delete
  • Performance tuning and customization parameters
  • Free-threaded objects for developing efficient Web server and multithreaded application servers

Figure 40.2 shows the object model for the interfaces provided by the OO4O Automation Server. The filled circle symbol represents many (an OraClient may contain many OraSession objects, for example).

Page 959

For more information on the OO4O Automation Server, see Chapter 41, "Oracle OLE Automation Server."

Figure 40.1.
The software layers in OO4O.


Figure 40.2.
An OO4O object model.


Page 960

Oracle C++ Class Library

The C++ class library contains a set of C++ classes that are essentially wrapper classes for the automation objects offered by the in-process server. This library helps C++ developers avoid the chore of writing OLE COM client code to access automation objects in C or C++.

In addition, the C++ class library contains classes that simplify the exchange of data between columns of query result sets and visual controls, such as edit, text, list, and combobox controls in Visual C++.

Oracle Data Control

You can think of a data control as an agent that handles the flow of information between the database and a visual control that is bound to it.

A data-aware control manages UI tasks (displaying, editing, and so on), whereas a data control is responsible for executing queries, managing result sets, and all other tasks involving communication with the database server.

The data control provides a powerful mechanism that enables you to build certain database applications without having to write any lines of code. The Oracle data control can also be accessed and manipulated programmatically.

The Oracle data control in Version 2.0 is an OCX that provides the same functionality that Microsoft's data control offers in Visual Basic. The control works with almost all data-bound controls the Microsoft data control supports.

This OCX uses the automation objects in OO4O for its implementation and therefore can take advantage of features specific to Oracle. An example of this capability is the ease with which PL/SQL cursor variables can be bound to data-aware controls.

For more information on the Oracle data control, see Chapter 42, "The Oracle Data
Control."

OO4O and the Open Database Connectivity API

Automation Servers that are implemented using the Open Database Connectivity (ODBC) API, such as the Microsoft Remote Data Objects (RDO) or the Data Access Objects (DAO), can only offer features that are accessible from the ODBC API. ODBC is a standard API for accessing relational databases and is often unable to provide access to functionality and features that are unique to a particular RDBMS product. OO4O, on the other hand, is designed and implemented to work exclusively with Oracle database servers. It is therefore able to make the functionality and features offered by the Oracle client libraries, such as the Oracle Call Interface (OCI), accessible from popular macro languages and environments such as Visual Basic.

Page 961

Host Environments

Oracle Objects for OLE is available for the Windows 3.1, 95, and NT operating systems.

According to Oracle, all new features and functionality planned for OO4O will be in the
32-bit version of the product. Version 2.0 was the first 32-bit release of OO4O.

The 16-bit version of the product still is supported, but will not contain new features that may be introduced in the future 32-bit versions of the product.

As stated earlier, OO4O may be used from any application or a development environment that supports Microsoft ActiveX technology. This includes the majority of modern tools that exist in the Windows 95 or NT platforms.

The OO4O C++ class library is supported in the Microsoft Visual C++ environment. To use the Oracle data control, you must have Visual Basic 4.0 or later.

Version 2.1 is the current release of OO4O at the time of this writing. Check the Oracle Web site (http://www.oracle.com) for up-to-date information regarding Version 2.2 and future releases of the product.

Summary

Oracle Objects for OLE provides access to data stored in Oracle databases from popular languages and environments in the Microsoft Windows operating systems (Windows 3.1, 95, and NT). It consists of an in-process Automation Server, a C++ class library, and the Oracle data control.

The Automation Server provides OLE automation objects for connecting to Oracle database servers, executing SQL statements and PL/SQL blocks, and managing the results.

The C++ class library removes the need for C++ developers to write OLE COM client code to access the Automation Objects in OO4O, and provides object-oriented access to data stored in Oracle databases. It also offers classes that simplify the exchange of data between query results and visual controls, such as edit, text and listbox controls in Visual C++.

The Oracle data control simplifies the flow of data between an Oracle database and visual controls such as edit, text, list, and grid controls in Visual Basic.

Oracle Objects for OLE provides an easier and a more optimized access to features that are specific to Oracle database servers and client libraries than do other ODBC-based components such as Microsoft RDO, DAO, and ADO.

Previous Table of Contents Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net