Document-ID:        33839.1
Subject:            WIN: OBJECT LINKING AND EMBEDDING (OLE) EXAMPLE
Author:             MZEWE
Last Revision Date: 18 December  1996


              Oracle Forms Storing OLE Objects in a Database.

     This bulletin gives a detailed example of how to store OLE objects in a
database through the use of Forms.  This sample includes the creation of a
simple table which will support the storing of objects, and a step by step
example of how to bring it all together in forms.

Note: Refer to the Object Linking and Embedding(OLE) Chapter 10 in the Oracle
Forms4.5 Advance Techniques Manual, or Chapter 2 of The Oracle Channel:
Implement Developer/2000 Applications Using OLE and VBX.

Object Linking and Embedding is a specification for communicating between
applications.  Although originally designed for Microsoft Windows, the
protocol is intended to be a cross-platform, cross-vendor specification that
generally supports application integration.  The most common application of
OLE is to support compound documents.  This is simply an application that
integrates information from multiple applications using OLE.

The following are the steps to store an OLE Object in a database.
1.)     Create a table with at least a primary key column and a Long Raw
        column to store the OLE object.

            Create table s_ole_test
                 (id_number NUMBER CONSTRAINT s_ole_test_pk PRIMARY KEY,
                 ole_object LONG RAW );

2.)     In Forms, connect to the database.

3.)     Create a new block based on the S_OLE_TEST table.

4.)     In the items tab of the New Block Options dialog box, change the
        OLE_OBJECT column,
               Items Options Type to an OLE control.

5.)     In the Layout tab of the New Block Options dialog box, specify the
        following properties:
             Style: Tabular
             Orientation: Horizontal
             Records: 3
             Options: Scrollbar

 6.)     Create an OLE Container with the following properties:
             Item Name: OLE_OBJECT
             In-place Activation: TRUE
             Base Table Item: TRUE
             Height: 120
             Width: 132

7.)     Set the following block property for S_OLE_TEST:
             Scrollbar Y Position: 190

8.)     From the Layout Editor Drag the Lower right corner of the form so that
        it completly contains all objects.  If this step is not done
        "FRM-30041:  Position of items places it off of canvas-view" error
        will occur.

9.)     Save the form and run the application.

10.)     Use the right mouse button to insert into the OLE Object.  (such as a
         MS Excel Chart)

11.)     Use Action-->Save to save the object to the database.

12.)     Rerun the form and query based on the ID.  Notice the object is
         returned.