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

Example: Using the CopyToFile Method

This example demonstrates the use of CopyToFile method. Make sure that you have the PART table in the database with valid LOB data in it.

Schema Description

Dim OraSession As OraSession

Dim OraDatabase As OraDatabase

Dim PartDesc as OraCLOB

'Create the OraSession Object.

Set OraSession = CreateObject("OracleInProcServer.XOraSession")

'Create the OraDatabase Object by opening a connection to Oracle.

Set OraDatabase = OraSession.OpenDatabase("ExampleDb",

"scott/tiger", 0&)

'Create a Dynaset containing a BLOB and a CLOB column

set part = OraDatabase.CreateDynaset ("select * from part where

part_id = 1234",0)

set PartDesc = part.Fields("part_desc").Value

'Copy the entire LOB content to partdesc.txt file

PartDesc.CopyToFile "partdesc.txt"