Oracle Objects for OLE C++ Class Library
Release 8.1.7

Part Number A85258-01

Library

Product

Contents

Read (OBlob, OClob, OBfile) Method

Applies To

OBlob

OClob

OBfile

Description

Reads into a buffer a specified portion of OBlob, OClob, or OBfile value. Returns the total amount of data read.

Usage

unsigned long Read(unsigned char *buffer, unsigned long buffersize, unsigned long offset = 0) const throw(
OException)

unsigned long Read(short *status, unsigned char *buffer, unsigned long buffersize, unsigned long offset = 0) const throw(
OException)

Arguments

status
Status of the current operation. Possible return values are:
· OLOB_NEED_DATA - There is more data to be read
· OLOB_NODATA - There is no data to be read usually due to an error condition
· OLOB_SUCCESS - Data read successfully
buffer
Pointer to user-supplied buffer.
buffersize
Size of the buffer.
offset
  1. based offset into the LOB where reading will begin. The default value of zero causes the read to start at the beginning of the LOB in non-streaming mode or the value passed to EnableStreaming when in streaming mode.
Remarks

This method reads the LOB or BFILE data from the offset and returns the number of bytes (Blobs/Bfiles) or characters (Clobs) read.

See the Remarks for
EnableStreaming. See GetOptimumChunkSize for additional comments.

Examples

Example: Reading a Blob

Example: Reading a Clob


 
Oracle
Copyright copy; 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents