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

Example: Reading and Inserting BFILEs using Dynasets

Directory and filename of the BFILE value of OraBFile can be modified to new value by using DirectoryName and FileName properties. Lock should be obtained before modifying DirectoryName and FileName properties. For inserting new row containing BFILE column, the BFILE column must be initialized with new directory and file name value using DirectoryName and FileName properties

Schema Description

Dim PartColl as OraBFile

Dim buffer As Variant

'Create a Dynaset containing a BLOB and a CLOB column

set part = OraDatabase.CreateDynaset ("select * from part",0)

PartColl = part.Fields("part_collateral").Value

'insert a new BFILE in the part_collateral column

part.AddNew

'Directory objects will be upper-case by default

PartColl.DirectoryName = "NEWDIRECTORYNAME"

PartColl.FileName = "NewPartCollatoral"

part.Update

'move to the newly added row

part.MoveLast

'open the Bfile for read operation

PartColl.Open

'read the entire bfile

amount_read = PartColl.Read(buffer)

'close the Bfile

PartColl.Close


 
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