Oracle Objects for OLE C++ Class Library
Release 9.2

Part Number A95896-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

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
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


 
Oracle
Copyright © 1998, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback