Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

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

CopyToFile (OraLOB/BFILE) Method

Applies To

OraBLOB, OraCLOB

OraBFILE

Description

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

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

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

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

OraBfile.CopyToFile "blob.bmp" amount,offset,chunksize

Remarks

The file will be in the same format as the NLS_LANG setting.

If the file exists, its contents is over-written.

Example

Example: Using the CopyToFile Method