Oracle Objects for OLE C++ Class Library
Release 9.2

Part Number A95896-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

Getting Started

Review the setup information that follows before you begin writing the C++ code or running the sample code provided with Oracle Objects for OLE. Also, see About Sample Code and Applications and Oracle Objects for OLE Files for additional considerations.

Organize Directories

First you will need to locate all the Oracle Objects for OLE C++ DLLs, libraries and headers in directories that are convenient for you. The listing below explains where the Oracle Objects for OLE installation procedure placed these items.

Directory Locations

Items
Directory Locations
· Main C++ classes
ORACLE_BASE\ORACLE_HOME\bin
Microsoft Visual C++ version
oraclm32.dll


· Main class library .lib file
ORACLE_BASE\ORACLE_HOME\oo4o\cpp\lib
Microsoft version
oraclm32.lib.


· Headers
ORACLE_BASE\ORACLE_HOME\oo4o\cpp\include


· Libraries, headers, and source for the user-interface widget bound classes
ORACLE_BASE\ORACLE_HOME\oo4o\cpp\mfc

Note: Use the Options item in the Tools menu of Microsoft Developer Studio to set up the directories which contain the Oracle Objects for OLE files that you need.

Connect to an Oracle Database

You must connect to an Oracle database. Please consult your Oracle documentation on how to do this. You will need a working knowledge of the SQL language because this is the way that you will interact with the Oracle database. Once you have established a connection, you are ready to start writing programs.

Initializing the Class Library

In your program you will need to initialize the class library before using it and uninitialize it before your program exits. This initialization and uninitialization must be done per application. Normally the initialization is done when the application program starts (for instance, in the application object initialization method) and the uninitialization is done when the program exits (for instance, in the application object destruction). For more information, see the documentation about the OStartup and OShutdown methods.

Accessing a Dynaset via an ODatabase object

The normal use of Oracle Objects for OLE is to obtain access to the data of an Oracle database using a dynaset object. If you consider the relationships between the objects in the class library (see Objects and their Relationships ) you will see that the dynaset is not the topmost object. You will have to create or instantiate some other objects that a dynaset is dependent on. You typically will construct an ODatabase object, which gives you a connection to the database, and then construct an ODynaset object, which will give you access to the data of the database. A Simple Example topic demonstrates this kind of simple access to the database.

Accessing a Dynaset via Managed Dynasets

An alternative approach is to use managed dynasets. In this case you use the OBinder class to take care of the database connection and dynaset. You will use bound objects, objects that are instances of subclasses of OBound, to access the data. The Workbook document gives some examples of using the class library this way. It is particularly suitable for programs that provide a user interface to the database's data.

Introduction to the Class Library

This on-line help system contains a section, About the Class Library, which contains introductory material on the class library, including explanatory subtopics. This system is also the reference manual for the class library, documenting and explaining all the classes and methods.

In addition to the online help system, a Workbook provides some worked-through examples of using the class library. The user-interface widget libraries (OMFC, OMFCxx) are documented in separate documents.

Using Oracle Objects for OLE with Visual Basic or VBA

Please see the Oracle Objects for OLE help for further details on using Oracle Objects for with Visual Basic (including the Oracle data control) and with other OLE Automation aware applications.


 
Oracle
Copyright © 1998, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback