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: Using the CopyFromFile Method

This example demonstrates the use of CopyFromFile 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 PartImage as OraBLOB

'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 PartImage = part.Fields("part_image").Value

'copy the entire content of partimage.jpg file to LOBS

part.Edit

PartImage.CopyFromFile "partimage.jpg"

part.Update


 
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