Index   Search   Add FAQ   Ask Question  

Oracle Objects for OLE (OO4O) FAQ

$Date: 11-Jan-1997 $
$Revision: 1.0 $
$Author: Frank Naudé $

Topics

  • What is Oracle Objects for OLE (OO4O)?
  • How does OO4O compare to ODBC?
  • Can I use OO4O to access Oracle data from Microsoft applications?
  • How does one connect to an Oracle Database?
  • What are the major VB/ODBC limitations that OO4O overcomes?
  • Where can I get more info about OO4O?

  • Back to Oracle FAQ Index

    What is Oracle Objects for OLE?

    Oracle Objects for OLE (OO4O) is a middleware product manufactured by Oracle Corporation that allows native access to Oracle7 databases from client applications via the Microsoft OLE (Object Linking and Embedding) standard. OO4O's predecessor was called Oracle Glue.

    Oracle Objects consists of the following three components:

  • Back to top of file

  • How does OO4O compare to ODBC?

    OO4O provides native access to Oracle and only Oracle databases. It is faster than ODBC access but one can use ODBC to connect to a variety of data sources.

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

  • Back to top of file

  • Can I use OO4O to access Oracle data from Microsoft applications?

    Yes, you can use OO4O from any Microsoft application that uses the VB-style macro language. This includes Visual Basic, Excel, and MS-Access.

  • Back to top of file

  • How does one connect to an Oracle Database?

    Sub Form_Load ()
      Dim OraSession  As Object     'Declare variables as OLE Objects
      Dim OraDatabase As Object
      Dim OraDynaset  As Object
    
      Set OraSession = CreateObject("OracleInProcServer.XOraSession")
      Set OraDatabase = OraSession.DbOpenDatabase("SQL*Net_Connect_String", "scott/tiger", 0&)
      MsgBox "Connected to " & OraDatabase.Connect & "@" & OraDatabase.DatabaseName
    
      'Create the OraDynaset Object and display the first value
      Set OraDynaset = OraDatabase.DbCreateDynaset("select empno, ename from emp", 0&)
      MsgBox "Employee " & OraDynaset.Fields("empno").value & ", #" & OraDynaset.Fields("ename").value
    End Sub
    

  • Back to top of file

  • What are the major VB/ODBC limitations that OO4O overcomes?

    (From the Oracle Objects Technical Overview by Keith Majkut):

    Visual Basic 3.0 database access is not very client/server oriented. In fact, the Visual Basic database access is really designed for flatfile databases, but Visual Basic can use ODBC to access SQL databases. Unfortunately, Visual Basic, by default, makes use of a local SQL engine, called JET to process queries (using the MS JET SQL implementation, NOT Oracle's). You may bypass the JET engine (using something called SQLPASSTHROUGH, which causes the SQL to be sent directly to the database), but doing so causes your dynaset to be read-only. You would then have to update data by constructing SQL insert/delete/update statements. You would not be able to use the built in AddNew, Delete and Update methods. (Note: SQL statements cannot contain text data > 32K and cannot contain binary data.)

    The drawbacks of the VB/JET/ODBC combination are many:

    Oracle Objects has no such drawbacks: At first, the VB/JET/ODBC limitations may not sound serious, but consider a typical production Oracle environment where most users only have access to data via synonyms and views. This means that VB/JET/ODBC users can only read, not write data.

  • Back to top of file

  • Where can I get more info about OO4O?

  • Back to top of file

  • General: Home | Index | Preamble | Glossary | OraCorp | Papers | Fun | News | Events | Y2000 | Books | Links | Forums
    Products: SQL | Plus | Loader | PL/SQL | PreComp | OPO | OMO | OO4OLE | DBA | PQO | PSO | OCO | Net | ODBC | WebServer | Des2k | Dev2k
    Systems: MVS | Unix | Windows | WindowsNT | NetWare | VMS