Oracle Objects for OLE
Release 9.2

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

Master Index

Feedback

CopyFromFile (OraLOB) Method

Applies To

OraBLOB, OraCLOB

Description

Loads or copies a portion or all of a local file to the internal LOB value of this object.

Arguments
Description
[in] filename
A string specifying the absolute name and path for the file to be read.
[in] [optional] amount
An Integer specifying the maximum number in bytes to be copied. Default value is total file size.
[in] [optional] offset
An Integer specifying the absolute offset of the BLOB/CLOB value of this object, in bytes for OraBlob/OraBFile and characters for OraClob. Default value is 1.
[in][optional] chunksize
An Integer specifying the size for each read operation, in bytes. If Chunksize parameter is not set or 0, the value of the amount argument is used, which means the entire amount is transferred in one chunk.
Usage

OraBlob.CopyFromFile "blob.bmp" amount, offset, chunksize

OraClob.CopyFromFile "clob.txt" amount, offset, chunksize

Remarks

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

The 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 (OraLob) method to shrink the LOB object to the size of the new data.

Example

Example: Using the CopyFromFile Method


 
Oracle
Copyright © 1994, 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