Questions tagged [occi]

Oracle C++ Call Interface (OCCI) is a high-performance and comprehensive API to access the Oracle database.

From the Oracle product page :

Oracle C++ Call Interface (OCCI) is a high-performance and comprehensive API to access the Oracle database. Based on Standard C++ and object-oriented paradigm, OCCI is designed for improved productivity and quality in developing Oracle database applications.

Introduced in Oracle9i, OCCI is being successfully used for client-server, middle-tier, and complex object modeling applications.

149 questions
8
votes
0 answers

Creating CLOB in OCCI for inserting into database

I have some large data objects that have been serialized into a string/ostringstream using Boost. I would like to store these serialized objects in the database with the datatype CLOB via a procedure. In order to do so I am creating a CLOB-object…
Svend Andreasen
  • 173
  • 1
  • 8
7
votes
2 answers

Oracle 12. Maximum duration for "select for update" for occi c++

We are using occi in order to access Oracle 12 via a C++ process. One of the operations has to ensure that the client has to pick the latest data in the database and operate according to the latest value. The statement is std::string sqlStmt =…
cateof
  • 6,608
  • 25
  • 79
  • 153
6
votes
2 answers

Copy Occi::ResultSet before closing Occi::Connection

I am using OCCI with C++ to get data from Oracle. The code works well, however I noticed some performance decrease. This happens because in the rset->next() iteration some computation takes time. The impact of this delay is that the oracle…
cateof
  • 6,608
  • 25
  • 79
  • 153
6
votes
1 answer

How to call a stored procedure with a parameter of type table

I'd like to call a stored procedure, that has a parameter of type TABLE. How can I do this using OCCI (11g1) in a windows C++ application? Here's the definition of the stored procedure: FUNCTION am_send( p_caFnr IN …
nabulke
  • 11,025
  • 13
  • 65
  • 114
5
votes
3 answers

Ubuntu ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255

I'm trying to run the following test program on Ubuntu to connect to an oracle database using the instant client OCCI library. #include #include using namespace oracle::occi; int main() { Environment *env =…
thepotter
  • 71
  • 1
  • 5
5
votes
1 answer

In Oracle OCCI/OCI, should buffer for reading LOBs be larger than actual data? Getting ORA-32116

We are reading data from a CLOB into an std::vector via OCCI. The simplified code looks as follows: oracle::occi::Clob clob = result.getClob( 3 ); unsigned len = clob.length(); std::vector< unsigned char > result( len ); unsigned have_read =…
4
votes
2 answers

c++ visual studio 2015 and OCCI

Is it possible to use OCCI (Oracle c++ call interface) within Microsoft Visual Studio 2015 community and if so, how? In the Oracle download section I can only find OCCI for Visual Studio 2010 or lower. Do I need to switch to VS2010 to use it?
Domdom
  • 41
  • 1
  • 3
3
votes
1 answer

Get OCCI Connection from Pro*C connection?

We maintain an extensive collection of components written in C++ that run under Linux, Solaris, AIX and HP/UX that connect to an Oracle database using Pro*C. I am about to write a component that performs a lot of dynamic SQL and would like to…
trojanfoe
  • 120,358
  • 21
  • 212
  • 242
3
votes
1 answer

Oracle OCCI stmt.setTimestamp insert TIMESTAMP(6): microseconds always 0

UPDATE: The "fraction of a second" parameter to Timestamp's constructor actually takes nanoseconds... I guessed it was hundredths of a second and my low values were rounded away. Question left for reference.... I'm struggling with Oracle's C++…
Tony Delroy
  • 102,968
  • 15
  • 177
  • 252
3
votes
1 answer

Is there a way to prefetch LOBs data in occi?

I'm working on a C++ application with Oracle as database and trying to fetch thousands of records with CLOB datatype. Been searching the net on how to prefetch a CLOB datatype in OCCI but always see this "Prefetching is not in effect if LONG, LOB or…
3
votes
1 answer

CMake does not find OCCI for C++ Oracle app

EDIT: Enough has changed from this that I have opened a new question. You can find it here. I'm trying to connect to Oracle 12c with C++ using OCCI. I am using CLion2016.1 with the supported version of Cygwin. Windows 7. The Oracle instant…
Malachi
  • 133
  • 10
3
votes
0 answers

Bind parameter by name in OCCI?

I am upgrading our database layer from OCI for Oracle 7 to OCCI for Oracle 12c. In OCI (7) it was possible to bind a parameter by number, such that in a statement SELECT * FROM TestTable WHERE name = :2 and number = :1 you could bind a value to :1…
3
votes
1 answer

how to SELECT a column which has a space in between its name

I am trying to execute a SQL query through OCCI calls in my CPP program. I want to read 2 columns out of those one column name has a space in between. I tried enclosing the column name between ' ', " ", [ ] and nothing helped. Can experts suggest…
Vijay
  • 55
  • 1
  • 5
3
votes
1 answer

Which version of Oracle instant client download should I use for Oracle 10g?

I have a requirement to connect to oracle database for this I am using OCCI as programming language. I would like is there any restriction on which client version can be used for a corresponding database i.e. Database to which I am connecting is at…
user2419621
  • 41
  • 1
  • 6
3
votes
1 answer

Having issues using oracle's OTT utility

This is the command I run on the command prompt: ott userid=username/password intype=object.typ outtype=objectOut.typ code=cpp hfile=temp.h cppfile=temp.cpp mapfile=tempmapfile.cppset This is the error i get: O2T-1118, Unable to…
1
2 3
9 10