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

CopyFromFile Method

Applies To

OBlob

OClob

Description

Loads or copies a portion or all of a local file to the internal LOB value of this object. File should be in the same format as the NLS_LANG setting.

Usage

void CopyFromFile(const char* filename, unsigned long amount = 0, unsigned long chunksize = 0, unsigned long offset = 1) const throw(OException)

Arguments
Description
filename
A string specifying the absolute name and path for the file to be read.
amount
An integer specifying the maximum number of bytes to be copied. Default value of 0 means total file size.
chunksize
An integer specifying the size, in bytes, for each read operation. This can range from 1 to amount. The optimal size for this will be a multiple of GetOptimumChunkSize. The default value of zero means a buffer is allocated equivalent to the size of the file.
offset
An integer specifying the absolute offset of the BLOB/CLOB value of this object. Default value is 1. In bytes for OBlob objects and characters for OClob objects
Remarks

Either a row-level lock or object-level lock should be obtained before calling this method.

File should be in the same format as the NLS_LANG setting.

Note: When manipulating LOBs using LOB methods, such as the Write and CopyFromFile, note that the LOB object will not automatically be trimmed if the length of the new data is smaller than the old data. Use the Trim method to shrink the LOB object to the size of the new data.


 
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