Skip Headers
Oracle® Objects for OLE C++ Class Library Developer's Guide
10g Release 2 (10.2)

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

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 in bytes.

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

Arguments
Description
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. In bytes for OBlob, in bytes for OClob if streaming is enabled, otherwise in characters.
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. In bytes for OBlob, characters for OClob.

Remarks

This method reads the LOB or BFILE data from the offset and returns the number of bytes read.

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

Examples

Example: Reading a Blob

Example: Reading a Clob