Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

Migration from Long Raw to LOB/BFILE

Oracle8i introduced the following new types described in Using Large Objects (LOBs):

· BLOB

· CLOB

· BFILE

The design of these types allow Oracle Objects for OLE to access them much faster than Long or Long Raw. For this reason you should convert existing Long Raw code to BLOB, CLOB and BFILE. However, new applications should only use LOBs and BFILEs. The OraLOB object should be used to access LOBs and BFILEs, rather than these Long Raw chunking methods which are provided for backward compatibility only. Note that OraLob offers maximum control.

For older applications using the Long Raw chunking methods, migration should be relatively simple with few code changes required. The primary code changes involve the requirement that NULL BLOBs and CLOBs be updated with "Empty" before being used.

LOB datatypes differ from LONG and LONG RAW datatypes in several ways:

· A table can contain multiple LOB columns but only one LONG column.

· A table containing one or more LOB columns can be partitioned, but a table containing a LONG column cannot be partitioned.

· The maximum size of a LOB is four gigabytes, but the maximum size of a LONG is two gigabytes.

· LOBs support random access to data, but LONGs support only sequential access.

· LOB datatypes (except NCLOB) can be attributes of a user-defined object type but LONG datatypes cannot.

· LOB client side buffering is available to optimize for multiple small writes.

· LOB data can be stored in operating system files outside of database tablespaces (BFILES).

To make migration easier, the following methods can be used with BLOBs, CLOBs, and BFILEs:

AppendChunk

AppendChunkByte

GetChunk

GetChunkByte

GetChunkByteEx

ReadChunk