Oracle Objects for OLE
Release 9.0.1

Part Number A90173-01


Book List


Master Index


Using Large Objects (LOBs)

The LOB datatypes (OraBLOB/OraCLOB and OraBFILE) enable you to store large blocks of unstructured data, such as text, graphic images, video clips, and sound waveforms, up to four gigabytes in size. They provide efficient, random, piece-wise access to the data.

Retrieving LOBs from the Database

Performance Considerations with LOB Read and Write

Writing LOB Data

Reading LOB Data

Migration from Long Raw to LOB/BFILE

The LOBs datatype is further sub divided into the following four types:

LOB Types
a LOB whose value is composed of

unstructured binary ("raw") data.

single-byte fixed-width character data that corresponds to the database character set defined for the Oracle database.

fixed-width multi-byte character data that corresponds to the national character set defined for the Oracle database.

a LOB whose large binary data is stored in operating system files outside of database tablespaces. They may also be located on tertiary storage devices such as hard disks, CD-ROMs, PhotoCDs, and DVDs.

In Oracle Objects for OLE, an instance of the BLOB datatype is represented as an OraBlob interface, a CLOB/NCLOB datatype is represented as an OraClob interface, and a BFILE datatype is represented as an OraBFile interface.

The following example creates a table having BLOB and CLOB columns and inserts some rows into it using
ExecuteSQL method on OraDatabase object.

Set OO4OSession = CreateObject("OracleInProcServer.XOraSession")

Set InvDb = OO4OSession.OpenDatabase("INVDB", "scott/tiger", 0)

InvDb.ExecuteSQL("create table part(part_id NUMBER, part_name

VARCHAR2(20),part_image BLOB, part_desc CLOB)")

InvDb.ExecuteSQL ("insert into part values (1,'ORACLE


InvDb.ExecuteSQL ("insert into part values (2,'ORACLE SERVER',


The EMPTY_BLOB() and EMPTY_CLOB() PL/SQL functions provide an empty LOB to insert into the LOB column.

Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.


Book List