Skip to Main Content

DevOps, CI/CD and Automation

Problem with OCCI createConnection

kcutressJul 23 2015 — edited Jul 23 2015

I'm having a problem with an OCCI program that only happens I use the release version of the code, debug version works fine..  The createConnection method is throwing an exception. I get the following message

Unhandled exception at 0x61f00414 (oraclient11.dll) in testit.exe: 0xC0000005: Access violation reading location 0x63706b63

I'm using Windows 7 Enterprise 32 bit and Visual Studio 2010 and I'm connecting to an Oracle 11g Release 2 database.  Here is the sample code.

#include <iostream>

#include "occi.h"

using namespace std;

using namespace oracle::occi;

int main(void) {

    Environment *env;

    Connection *conn;

    env = Environment::createEnvironment(Environment::DEFAULT);   

    cout << "created environment" << endl;

    conn = env->createConnection("myuserid", "mypassword", "mydatabase");

    cout << "Connected to database" << endl;

    env->terminateConnection (conn);

    Environment::terminateEnvironment (env);

    cout << "Disconnected from database" << endl;

    return 0;


Any ideas?

Post Details
Locked on Aug 20 2015
Added on Jul 23 2015