Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue with CLOB in SetDataBuffer

KamnsJun 13 2018 — edited Jul 24 2018

Hi,

I am trying to pass CLOB to Oracle database using occi function SetDataBuffer but I get below error

ORA-24813: cannot send or receive an unsupported LOB

Below is the snippet of my C++ code

Clob clob(con_); // con_ is a database connection

stmt->registerOutParam(1,OCCICLOB);

stmt->executeUpdate();

clob = stmt->getClob(1);

clob.open(OCCI_LOB_READWRITE);

clob.write(val.length(),val.c_str(),buffsize);

                                                                                     

(clobColumnsMap_[columPosition]).push_back(clob); // I have a CLOB map where I am pushing these clob objects

(clobColumnsLenMap_[columPosition]).push_back(clob.length());

and when calling SetDataBuffer, this is what I am doing -

Type type = OCCI_SQLT_CLOB;

sb4 size = sizeof(clobColumnsMap_.at(columPosition).data());

Clob* colValue = clobColumnsMap_.at(columPosition).data();

ub4* colLen = clobColumnsLenMap_.at(columPosition).data();

stmt->setDataBuffer(columPosition, colValue, type, size, colLen);

Can anyone please help me with this issue?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2018
Added on Jun 13 2018
2 comments
480 views