Oracle Objects for OLE

From Oracle FAQ
Jump to: navigation, search

Oracle Objects for OLE (OO4O) is a middleware product manufactured by Oracle Corporation that allows native access (no ODBC) to Oracle databases from client applications via Microsoft OLE (Object Linking and Embedding) and COM.

One can bind grids, text box widgets, and so on to OO4O via its own Data Control, one can also create dynasets, execute stored procedure code, or just about any other Oracle command one can think of. Oracle Objects consists of the following three components:

  • An OLE 2.0 Automation (InProcess) Server
This provides an OLE Automation interface to applications that support OLE automation scripting such as Visual Basic (VB).
  • An Oracle Data Control
This is the Visual Basic custom control (VBX).
  • Two C++ Class Libraries
C-Libraries for Microsoft Foundation Classes (MFC) and Borland (OWL).

OO4O's predecessor was called Oracle Glue.

Compared to ODBC[edit]

OO4O provides native access to Oracle and only Oracle databases, and is thus faster than ODBC access. ODBC is more generic and not database specific at all. One can use ODBC to connect to databases like Oracle, DB/2, SQLServer, etc. For more information about ODBC, read the ODBC FAQ.

OO4O closely follows the ODBC query interface model, one can retain over 95% code compatibility between the OO4O and ODBC versions of data layer procedures. This translates to very short retooling times when porting between OO4O and ODBC.

OO4O Objects available for use while programming[edit]

OO4O makes the following high-level Objects available for use:

  • OraSession
The first top-level object needed before we can connect to an Oracle database.
  • OraServer
Represents a physical connection to an Oracle database server instance. The OpenDatabase function can be used to create client sessions by returning an OraDatabase object.
  • OraDatabase
Represents a single login to an Oracle database. Similar to the ADO Connection object. OraDatabase objects are returned by the OraSession.OpenDatabase function.
  • OraConnection
Returns various pieces of user information about the current OraSession object. It can be shared by many OraDatabase objects, but each OraDatabase must exist in the same OraSession object.
  • OraDynaset
Similar to an ADO Recordset object. Represents the results retrieved by a call to the OraDatabase.CreateDynaset function.
  • OraField
Represents a column of data within an OraDynaset object. Similar to the ADO Field object of an ADO Recordset.
  • OraClient
Automatically created by OO4O as needed. Maintains a list of all active OraSession objects currently running on the workstation.
  • OraParameter
Represents a bind variable for a SQL statement or PL/SQL block to be executed using the OraDynaset object. Similar to the Parameter object in an ADO Command object.
  • OraParamArray
Allows arrays of parameters to be set for the OraDatabase.Parameters function.
  • OraSQLStmt
Represents a single SQL statement. Typically used with SQL statements that include bind variables to improve performance as Oracle does not have to parse the statement each time it is executed. Can be thought of as conceptually similar to the ADO Command object.
  • OraMetaData
Returns meta data to describe a particular schema such as column names. Similar to the SQL Server DMO object library. See the meta data example below.
  • OraAQ
The CreateAQ method of the OraDatabase returns an OraAQ object. This provides access to Oracle's Advanced Queuing message system that allows messages to be passed between applications, much like MSMQ.

Also see[edit]

  • OO4O FAQ, frequently asked questions.
  • Glue, OO4O's predecessor product.