Forum Stats

  • 3,769,582 Users
  • 2,252,983 Discussions
  • 7,875,102 Comments

Discussions

Problem with OCCI createConnection

kcutress
kcutress Member Posts: 1
edited Jul 23, 2015 3:40PM in Oracle Call Interface (OCI)

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?

This discussion has been closed.