OCCI

Is there a way to prefetch LOBs data in occi?

匆匆过客 提交于 2021-02-10 13:15:53
问题 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 Opaque Type columns (such as XMLType) are part of the query." Is there a way in OCCI in order to prefetch CLOB or are there other alternative solutions to improve the time spent to fetch CLOB data? Thanks for the help. 回答1: There is a way to do

Is there a way to prefetch LOBs data in occi?

亡梦爱人 提交于 2021-02-10 13:06:01
问题 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 Opaque Type columns (such as XMLType) are part of the query." Is there a way in OCCI in order to prefetch CLOB or are there other alternative solutions to improve the time spent to fetch CLOB data? Thanks for the help. 回答1: There is a way to do

OCCI linkage error with gcc 5

痴心易碎 提交于 2020-01-03 01:47:49
问题 Recently I've upgraded my gcc from 4.1.2 to 5.2.0. This caused a linkage error with the OCCI library: Source Code I'm trying to run: #include <iostream> #include <occi.h> using namespace oracle::occi; using namespace std; int main (int argc, char *argv[]) { Environment *env; Connection *conn; oracle::occi::MetaData metaData = conn->getMetaData ((char *)"PERSON_OBJ"); metaData.getString(MetaData::ATTR_NAME); return(0); } The linkage error: gmake -f /home/davidd/temp.mak CFG=Debug g++ -g "-Wl,

Connecting c++ program with Oracle

落花浮王杯 提交于 2019-12-25 08:59:08
问题 I'm trying to connect my C++ program to Oracle database(12.2). My C++ program is (I am using g++ compiler in ubuntu), #include <occi.h> #include <iostream> using namespace std; int main() { oracle::occi::Environment *env = oracle::occi::Environment::createEnvironment(); oracle::occi::Connection *conn = env->createConnection("bsk", "oraclepass"); env->terminateConnection(conn); oracle::occi::Environment::terminateEnvironment(env); } I'm getting the error undefined reference to `oracle::occi:

OCCI C++ app undefined reference

别等时光非礼了梦想. 提交于 2019-12-25 06:45:13
问题 I started here but so much has changed I thought it best to start a new question, especially since I think the CMake issue in the that question is solved. Background I'm trying setup a basic shell of a project that involves connecting a C++ midtier to an Oracle 12c database. Environment 1. MinGW-64 (x86_64-4.9.1-release-win32-sjlj-rt_v3-rev2) 2. Windows 7 64-bit 3. CLion 2016.1.1 (so I'm using CMake 3.5.1) 4. All of the OCCI DLLs are in system32. 5. Both the libs and the dlls are in C:/Users

OCCI app crashes when running in debug mode in Visual Studio 2005

萝らか妹 提交于 2019-12-25 06:22:26
问题 I'm attempting to get a development environment up and running for developing applications with Oracle C++ Call Interface (OCCI) in Visual Studio 2005. My system specs are: OS: Windows 7, 64-bit Oracle: 11g release 11.2.0.2, 32-bit Instant Client: BasicLite and SDK version 11.2.0.4 32-bit Visual Studio 2005 Professional Edition version 8.0 with 32-bit tools enabled I've followed this guide by Mark Williams and I got the example running but only in release mode. When I switch to debug mode the

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

雨燕双飞 提交于 2019-12-24 03:25:39
问题 I'm trying to run the following test program on Ubuntu to connect to an oracle database using the instant client OCCI library. #include <iostream> #include <occi.h> using namespace oracle::occi; int main() { Environment *env = Environment::createEnvironment(Environment::DEFAULT); Connection *conn = env->createConnection( "user", "1234" ); env->terminateConnection(conn); Environment::terminateEnvironment(env); } There are no errors when compiling g++ main.cpp -L ~/instantclient_12_2 -locci

CMake does not find OCCI for C++ Oracle app

匆匆过客 提交于 2019-12-23 21:14:22
问题 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 client (both basic and sdk) were downloaded yesterday (29Mar2016) Note: C:/Users/hunrt/libs has been added to my system path. I have just a main.cpp file: #include <occi.h> using namespace oracle::occi; int main() { Environment *env = Environment:

oracle::occi::ResultSet::next() crashes my program

此生再无相见时 提交于 2019-12-13 05:46:43
问题 I have a 64 bits C++ server application running on windows 7 and when it does a select on the database and calls next() on the result set the process simply dies, no exceptions, no dumps and no debug info after ResultSet->next(). Writes on the database works with no problems and both reads and writes works on the 32 bit version I'm using the 11.2 version of the win64 oracle libraries that came with instant client and SDK EDIT: it's the simplest of codes const std::string sql("select * from

OCCI linkage error with gcc 5

依然范特西╮ 提交于 2019-12-06 15:49:53
Recently I've upgraded my gcc from 4.1.2 to 5.2.0. This caused a linkage error with the OCCI library: Source Code I'm trying to run: #include <iostream> #include <occi.h> using namespace oracle::occi; using namespace std; int main (int argc, char *argv[]) { Environment *env; Connection *conn; oracle::occi::MetaData metaData = conn->getMetaData ((char *)"PERSON_OBJ"); metaData.getString(MetaData::ATTR_NAME); return(0); } The linkage error: gmake -f /home/davidd/temp.mak CFG=Debug g++ -g "-Wl,-rpath,/omniqdir/arch/x86_64/release/lib:/omniqdir/instantclient_12_1:/usr/lib,-rpath-link,/omniqdir