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
3
votes
1 answer

What is a .sym file and how can I use it from Visual-C++?

Oracle OCCI for VS2010 contains following files: oraocci11.dll (~ 500 KB) oraocci11.lib (~ 800 KB) oraocci11.sym (~ 546 KB) The DLL is obvious. The lib file - judging from it's size, would appear to be the static library. But what is the .sym…
Martin Ba
  • 37,187
  • 33
  • 183
  • 337
2
votes
1 answer

How to read unicode from oracle database c++

I am trying to select string written in Arabic letters from oracle database using C++ The problem is i read Chinese characters instead I am using their globalization guide Environment* env = Environment::createEnvironment("…
ma1169
  • 659
  • 1
  • 8
  • 26
2
votes
1 answer

how to use setDataBuffer from OCCI for array fetches

I have a query that I'm executing on a database that returns an array of records, I read in the Oracle OCCI documentation you have to use the ResultSet::setDataBuffer() function to fetch array's of data from the db. I just don't get what I'm…
Tony The Lion
  • 61,704
  • 67
  • 242
  • 415
2
votes
2 answers

Compatibility issues with Oracle OCCI and g++ 7.1

I am trying to create a C++ application with OCCI (versions 11,12,18, all lead to the same issue explained below) using gcc 7.1. The application below compiles and runs fine with gcc 4.8.5 unter RHEL7, but throws an error ORA-24960: the attribute …
andreee
  • 4,459
  • 22
  • 42
2
votes
0 answers

Obtaining the size of a Clob object

I am trying to call a stored procedure from C++ code using OCCI. The stored procedure has the following signature: create or replace PROCEDURE "MYTESTPROC" ( param1 OUT NUMBER, param2 OUT int, param3 OUT smallint, param4 …
Andrei
  • 21
  • 1
2
votes
0 answers

How to store 64 bit integers using oracle::occi::Statement::setDataBuffer()?

Using OCCI (Oracle C++ Call Interface), I would like to use setDataBuffer() to insert 64 bit integer values into an Oracle table with a NUMBER(19) column. If I pass an array of 64 bit int's to setDataBuffer() and set the data size to 64 bits (8…
Damascus Steel
  • 323
  • 1
  • 2
  • 13
2
votes
0 answers

c++ Windows _CrtSetDbgFlag stop working when calling 3rd party library

My windows program consists of a C++(MFC) console application my.exe, which issues _CrtSetDbgFlag to see memory leaks on exit. a C++(non-MFC) my.dll. This dll calls a 3rd party library (Oracle's OCCI C++ library). my.exe has a deliberate leak in…
Philip Beck
  • 375
  • 2
  • 10
2
votes
1 answer

Error at compiling Oracle Database Environment in c++ on codeblocks

I am trying to develop a two-tier program, and for that, I need to connect my program to a database (Oracle in this case), through the OCCI interface using connection pools. I have linked the occi.h header file and directory in CodeBlocks already,…
avarus
  • 37
  • 5
2
votes
1 answer

Oracle number precision and scale both zero when case is used in select clause

Given this table, CREATE TABLE test ( c01 INT, c02 NUMBER(10,5), c03 NUMBER(18,10) ); I use OCCI (the C++ Library) to execute the following SELECT query: select case(c01) when 10 then c02 else c03 end from test; In this case,…
Nawaz
  • 353,942
  • 115
  • 666
  • 851
2
votes
0 answers

Oracle OCCI UString to std::wstring

In Oracle DB providers there is a term UString, which is used when dealing with UTF16 char set. Here it is how it is defined: typedef unsigned short utext; typedef std::basic_string UString; My App uses wstring for unicode and as we know…
Kiko
  • 319
  • 1
  • 4
  • 16
2
votes
0 answers

Issue in getting a VARCHAR2 type column using getString() in OCCI

I have to read a column of VARCHAR2 type from Oracle table in my CPP code. When I tried to get the VARCHAR2 as a string using getString() of OCCI call, the code fails. In the below code, I am concerned in getting table column COST_VALUE of…
Vijay
  • 55
  • 1
  • 5
2
votes
1 answer

Visual Studio Debug Runtime Errors for OCCI C++ Application

I'm using Visual Studio to develop a C++ program that uses OCCI to query an Oracle 11g database. It's a pretty simple program at this point, and only makes a single query, but I keep running into runtime errors. I first tried to develop this in…
2
votes
1 answer

Where am I wrong? SetDataBuffer for DATE

I want to do array fetch for DATE in oracle with following code. It compiles alright and export all other data types correctly, except for the DATE type. The program says "ora-32146 cannot peform operation on a null date". Any one can see where I am…
Michael
  • 673
  • 2
  • 5
  • 23
2
votes
1 answer

How to use vector in OCCI setDataBuffer?

I have a simple table called mytable2 with only one column, name as varchar2(20). I now have a list of names stored as vector of std::string to be inserted into the table. I want to use executeArrayUpdate, so I must do the setDataBuffer…
Michael
  • 673
  • 2
  • 5
  • 23
1
vote
0 answers

TimeStamp::getTimeZoneOffset returns the same offset for STD and DST?

I'm getting the time zone offset of a TIMESTAMP column using oracle::occi::Timestamp::getTimeZoneOffset method, but got the same results when retrieving a timestamp value in summer time (2020-09-30) than when retrieving other value which is in…
Lucas Ayala
  • 2,309
  • 2
  • 16
  • 20
1
2
3
9 10