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: Modifying LOB value

Schema Description

Dim OraSession As OraSession

Dim OraDatabase As OraDatabase

Dim OraDynaset As OraDynaset

Dim PartDesc as OraClob

Dim buffer As String

'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&)

'execute the select statement

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

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

'Open the file for reading

Open "partdesc.dat" For Binary As #FNum

'Allocate buffer to the size of file FNum and read the entire file

buffer = String$(LOF(FNum), 32)

Get #FNum, , buffer

'lock the row for write operation

OraDynaset.Edit

amount_written = PartDesc.Write(buffer)

'commit the operation and release the lock

OraDynaset.Update

Close FNum


 
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