My Oracle Support Banner

OCCI: How To Populate BLOB Column Using PL/SQL Procedure Executed By OCCI (Doc ID 1306359.1)

Last updated on JUNE 27, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

Goal

 This document describes how to pass a BLOB from OCCI via PL/SQL procedure into a table containing a BLOB column to allow manipulation of BLOB content inside PLSQL if direct access using OCCI BLOB Class is not possible.

 In the first part of t1.cpp for rows are inserted - row 1 and 3 containing a BLOB value "HELLO" while row 2 and 4 are propulated as NULL using the indicator variable set to -1 in setDataBuffer(). 

After that, two updates are performed to change the BLOB value in row 3 from "HELLO" to NULL - using indicator variable set to -1 in setDataBuffer() and second in row 4 from NULL to value "MY WORLD".

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 Requirements
 Configuring
 Instructions
 Sample Code
 Sample Output


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.