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: INSERT/UPDATE with LOBs and Transactions

Schema Description

Dim OraSession As OraSession

Dim OraDatabase As OraDatabase

Dim ImageChunk() As Byte

Dim amount_written As Long

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

OraParameters.Add "PartImage", Empty,ORAPARAM_OUTPUT

OraParameters("PartImage").ServerType = ORATYPE_BLOB

'Create a Dynaset containing a LOB,column

OraDatabase.ExecuteSQL ("insert into part values (1234,"Oracle

Application, EMPTY_BLOB(),NULL,NULL)

RETURNING part_image INTO :PartImage ")

set PartImage = OraDatabase.Parameters("PARTIMAGE").Value

'the following lines of code will raise error

'LOB locator cannot span transaction'

msgbox Partimage.Size


 
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