Oracle COM Automation Developer's Guide
Release 8.1.6 for Windows NT

Part Number A73027-01

Library

Product

Contents

Index

Go to previous page Go to next page

1
Introducing Oracle COM Automation

This chapter describes the Oracle COM Automation feature Software Development Kit (SDK) and provides an overview of the product. Read this chapter before installing or using Oracle COM Automation feature. Specific topics discussed are:

Introducing Oracle COM Automation Feature

Component software has been promoted as the next evolution in software development. The growth of object-oriented programming and distributed objects are proof of this industry-wide trend. The scripting of components enables you to reuse code that is pre-built and pre-tested. The reuse of code fulfills one of the key objectives of software development: shorter development cycles and reduced time to market. COM is the ubiquitous technology to promote componentization and reuse of software for Windows-based systems. Oracle COM Automation feature has been created to enable you to use COM-based components to customize and enhance the functionality of the Oracle database on Windows NT.

Updates for Release 8.1.6

Two new demonstration programs have been added:

See Chapter 5, "Using Oracle COM Automation Demos" for information on using the demonstration programs.

Additional error messages have been included in this guide. See "Oracle COM Automation Errors".

What Is Oracle COM Automation Feature?

Oracle COM Automation feature enables PL/SQL developers to programmatically manipulate COM objects through the OLE Automation interface (IDispatch).

The feature provides a PL/SQL package and exposes a set of application programming interfaces (APIs) to instantiate COM objects, get and set their properties, and invoke their methods. PL/SQL developers can call these APIs from PL/SQL subprograms, stored procedures, stored functions, or triggers to manipulate COM objects. There are no restrictions as to where the COM objects can reside. They can be either local to the database server or be accessed remotely through the Distributed Component Object Model (DCOM).

OLE Automation is the most common and basic mechanism for third-generation language (3GL) and fourth-generation language (4GL) programs to manipulate COM objects. Most COM objects support OLE Automation and the major 4GL programming environments, such as Powersoft PowerBuilder and Microsoft Visual Basic. OLE Automation is the mechanism for scripting COM objects.

Benefits of Oracle COM Automation Feature

Oracle COM Automation feature is a powerful and enabling infrastructure technology for Oracle developers on Windows NT. The feature provides four compelling benefits for developers who are creating and deploying Oracle solutions on Windows NT:

Oracle COM Automation Feature Architecture

Oracle COM Automation feature provides a PL/SQL package of APIs for manipulating COM objects. These APIs are implemented as external procedures in a dynamic linked library (DLL).

Oracle8i supports external procedures which enables developers to call 3GL functions from server-based object type methods and stored procedures. External procedures are invoked exactly like standard PL/SQL stored procedures. However, unlike standard PL/SQL procedures where the body of the procedure is written in PL/SQL and stored in the database, external procedures are C functions that reside within a DLL. You can invoke Oracle COM Automation feature APIs in the same manner as if you are calling a standard PL/SQL stored procedure or function.

Figure 1-1, "Oracle COM Interaction" illustrates the interaction between an Oracle8i database, Oracle COM Automation feature, and external procedures:

Figure 1-1 Oracle COM Interaction


Text description of comdg001.gif follows

Text description of the illustration comdg001.gif

Invoking OLE Automation External Procedure APIs

The Oracle database invokes any of the OLE Automation external procedure APIs as follows:

  1. The PL/SQL interpreter looks up the pathname to the Oracle COM Automation feature DLL (com81.dll).

  2. The PL/SQL interpreter sends a message using Net8 to the listener to start extproc.exe, if it has not already been started for the current user session.

  3. The PL/SQL interpreter passes the procedure name, parameters, and the pathname of the DLL to extproc.exe.

  4. extproc.exe loads the DLL and executes the external procedure. Each of the OLE Automation external procedure APIs in turn call Win32 APIs that instantiate a COM object, set or get properties of a COM object, or invoke a method of a COM object.

  5. extproc.exe acts as an intermediary and handles any interaction between Oracle COM Automation feature and Oracle8i database.

Figure 1-2, "Invoking OLE Automation External Procedures" shows an Oracle8i database invoking OLE Automation external procedure APIs.

Figure 1-2 Invoking OLE Automation External Procedures


Text description of comdg002.gif follows

Text description of the illustration comdg002.gif

Architectural Impact on Availability and Performance Issues

The dependence on external procedures by Oracle COM Automation feature has implications for the availability of the Oracle8i database and the performance of Oracle COM Automation feature.

Oracle Database Availability

You do not jeopardize the availability of the Oracle database by using Oracle COM Automation feature and custom or third-party COM objects in a production environment. Oracle COM Automation feature operates outside of the Oracle kernel's address space. This safeguards the Oracle kernel from COM objects that crash unexpectedly.

Oracle COM Automation Feature Performance

Currently, there are two architectural models in which an external procedure can be invoked. The model used directly affects the performance of Oracle COM Automation feature. In this release, you can choose Architectural Model 1 or Architectural Model 2.


Go to previous page Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index