Skip Headers
Oracle® Objects for OLE Developer's Guide
11g Release 1 (11.1)

Part Number B28378-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

1 Introducing Oracle Objects for OLE

This chapter introduces Oracle Objects for OLE (OO4O).

This chapter contains these topics:

Overview of Oracle Objects for OLE

Oracle Objects for OLE (OO4O) allows you to access data stored in Oracle databases with any programming or scripting language that supports Microsoft COM Automation and ActiveX technology. This includes Visual Basic, Visual C++, Visual Basic for Applications (VBA), IIS Active Server Pages (VBScript and JavaScript), and others.

Figure 1-1 illustrates the software layers that comprise the OO4O product.

Figure 1-1 Software Layers of OO4O

Description of Figure 1-1 follows
Description of "Figure 1-1 Software Layers of OO4O"

OO4O provides the following:

Oracle Objects for OLE In-Process Automation Server

The OO4O In-Process Automation Server is a set of COM Automation Objects for connecting to Oracle databases, executing SQL statements and PL/SQL blocks, and accessing the results.

Figure 1-2 illustrates the object model that comprise the OO4O product.

Figure 1-2 Automation Objects

hierarchy diagram starting with OraSession
Description of "Figure 1-2 Automation Objects"

Unlike other COM-based database connectivity APIs, such as Microsoft ActiveX Data Objects (ADO), the OO4O Automation Server was created specifically for use with Oracle databases. It provides an optimized API for accessing features that are unique to the Oracle database and are otherwise cumbersome or unavailable from ODBC or OLE DB components.

OO4O provides key features for accessing Oracle databases efficiently and easily in environments ranging from the typical two-tier client/server applications, such as those developed in Visual Basic or Excel, to application servers deployed in multitiered application server environments such as Web server applications in Microsoft Internet Information Server (IIS) or Microsoft Transaction Server (MTS).

Features include:

Oracle Data Control

Oracle Data Control is an ActiveX control that is designed to simplify the exchange of data among an Oracle database and visual controls such as edit, text, list, and grid controls in Visual Basic and other development tools that support custom controls.

A data control enables you to perform most data access operations without writing any code. To create a dynaset with a data control, set the Connect, DatabaseName, and RecordSource properties, and execute the Refresh command.

A data control enables you to bind it to other controls that display a field, a record, or multiple records of the underlying dynaset. When record movement occurs, data in bound controls stay synchronized with the current record of the dynaset. If a user changes data in a control that is bound to a data control, the changes are automatically reflected in the underlying dynaset and database.

The Oracle Data Control is compatible with the Microsoft data control included with Visual Basic. If you are familiar with the Visual Basic data control, learning to use Oracle Data Control is quick and easy. Communication between data-aware controls and a Data Control is governed by a protocol specified by Microsoft.

Oracle Objects for OLE C++ Class Library

The Oracle Objects for OLE C++ Class Library is a collection of C++ classes that provide programmatic access to the OO4O Automation server. Although the class library is implemented using OLE Automation, neither the OLE development kit nor any OLE development knowledge is necessary to use it. This library helps C++ developers avoid writing COM client code to access the OO4O interfaces.

In addition to the object classes, the class library provides a bound class, which allows controls such as text and list boxes to be linked directly to a field of a dynaset (columns of a table in the database). The bound class supports late, run-time binding, as is available in Visual Basic. The Oracle Objects for OLE C++ Class Library is supported for Microsoft Visual C++ and the Microsoft Foundation Classes for the bound class.

See Also:

Oracle Objects for OLE C++ Class Library Developer's Guide available as online help

Required Setups

This section discusses the required setups for using Oracle Objects for OLE.

Installation

Oracle Objects for OLE can be installed in multiple Oracle homes, starting with Oracle Database 10g. However, being a COM component, only one instance can be active on the computer. This means that the current (latest) installation renders the previous one inactive. You can switch Oracle homes by using the Oracle installer.

System Requirements

The following system requirements are necessary to install Oracle Objects for OLE:

  • Windows Vista (Business, Enterprise, and Ultimate Editions), Windows Server 2003, Windows Server 2003 R2, Windows 2000, or Windows XP Professional Edition

  • A local or remote Oracle database (Oracle9i, Oracle Database 10g, or Oracle 11g release 1)

  • Oracle Client 11g release 1. Oracle Universal Installer ensures that the RSFs are installed as part of the OO4O installation.

  • The OO4O automation server requires an application that supports COM Automation such as:

    • Microsoft Visual Basic

    • Microsoft Excel

    • Microsoft Access

    • Microsoft Internet Information Server (IIS)

    • Borland Delphi

Other Requirements

The following other requirements may be necessary:

  • The Oracle Data Control requires Visual Basic.

  • The Oracle Objects for OLE C++ Class Library requires Microsoft Visual C++ Version 6.0 or later.

  • The OO4O Code Wizard requires Visual Basic 6. Visual Basic 6 must be installed before installing the Code Wizard.

  • The Oracle In-Process Server Type library (oipVER.tlb) must be referenced when an OO4O Visual Basic project is developed.

    To do this, select References from the Project menu (VB 5.0/6.0) and check the box next to the Oracle In-Process Server 5.0 Type Library, which should be pointing to the ORACLE_BASE\ORACLE_HOME\bin\oipVER.tlb file. See "Using Oracle Objects for OLE Automation with Visual Basic" for detailed information.

See Also:

"Oracle Objects for OLE Redistributable Files" and "Troubleshooting" for further information on Oracle Objects for OLE requirements

Oracle Objects for OLE File Locations

As part of the OO4O installation, the following directories are created and contain the corresponding files:

Component Certifications

Oracle provides support information for components on various platforms, lists compatible client and database versions, and identifies patches and workaround information.

Find the latest certification information at: http://metalink.oracle.com/

You must register online before using OracleMetaLink. After logging in, select Certify & Availability from the left-hand column. From the Product Lifecycle page, select the Certifications button. Other Product Lifecycle options include Product Availability, Desupport Notices, and Alerts.

Oracle Objects for OLE Redistributable Files

This section discusses files that can be redistributed or updated on a computer that belongs to an end user or a developer.

If you cannot guarantee that your end users have the current release of Oracle Objects for OLE installed on their computers, you need to redistribute specific files that are part of Oracle Objects for OLE along with your OO4O application. A typical scenario might be if OO4O is installed as a patch without use of Oracle Universal Installer.

Redistributable File Locations

Table 1-1 lists the Redistributable file locations with comments and further actions that are needed.

Table 1-1 Redistributable File Locations

Files Place in Directory Further Actions Comments

oipVER.dll

ORACLE_BASE\ ORACLE_HOME\bin

Execute the following from a command prompt:

drive:\path>

regsvr32.exe oipVER.dll

None.

oipVER.tlb

ORACLE_BASE\ ORACLE_HOME\bin

None.

None.

oraansiVER.dll

ORACLE_BASE\ ORACLE_HOME\bin

None.

Change VER to the current version.

oo4oparm.reg

ORACLE_BASE\ ORACLE_HOME\oo4o

Edit for the correct ORACLE_HOME location and HOMEID on your computer. Execute the following from a command prompt: drive:\path>

oo4oparm.reg

File provided to register OO4O configuration information.

oiplang.msb

ORACLE_BASE\ ORACLE_HOME \oo4o\mesg

None.

This message file is language-specific. oipus.msb is the English version, and oipja.msb is the Japanese version.

oraclm32.dll

(for Microsoft

VC++)

or

oradc.ocx

ORACLE_BASE\ ORACLE_HOME\bin

For oradc.ocx, execute:

regsvr32.exe oradc.ocx drive:\path>

Distribute the files that correspond to the development software used in your application.


Additionally, ensure that the system requirements described in "Overview of Oracle Objects for OLE" are met.

You must also distribute the files from the following list that correspond to the development software you used to build your application:

  • oraclm32.dll (for Microsoft Visual C++)

  • oradc.ocx

Updating Files and Registrations

The oo4oparm.reg file is provided to register OO4O configuration information. Review this file and edit it as necessary to reflect the correct ORACLE_HOME location and HOMEID on your computer. To register oipVER.dll and enter the OO4O configuration information for oo4oparm.reg in the registry, execute the following from a command prompt:

drive:\path> regsvr32.exe oipVER.dll

drive:\path> oo4oparm.reg

The message file oiplang.msb should also be provided and copied to the ORACLE_BASE\ORACLE_HOME\oo4o\mesg directory. The message file is specific to a language. For example, oipus.msb is the English version and oipja.msb is the Japanese version.

Note:

Oracle Data Control (oradc.ocx) must be registered to function. The OLE Control Extension (OCX) can be registered by executing the following at the command prompt:

drive:\path> regsvr32.exe oradc.ocx