Hi, I have this source code and it is copiled without problems. But when I debug this program than it write error 24960. This is my program:

#include <iostream>
#include <occi.h>

using namespace std;
using namespace oracle::occi;

#define USER  "SYS"
#define PASS  "****"
#define DB    "XE"

int main()
{
   Environment* env;
   Connection*  con;

   try {
      //vytvorenie spojenia
      env = Environment::createEnvironment();
      con = env->createConnection(USER, PASS, DB);

      //ukoncenie spojenia
      env->terminateConnection(con);
      Environment::terminateEnvironment(env);

   } catch (SQLException e) {
      cout << "ORACLE ERROR:" << e.getErrorCode() << " - " << e.getMessage() << endl;
   }

   return 0;
}

Thanks

This may be helpful to you.

Optionally you also my need to download OCCI from here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.