3 Replies Latest reply on Apr 6, 2012 4:30 AM by Sudheendra-Oracle

    OCCI For 10g


      I'm very confused about how to install OCCI. I'm on Windows 7 using Visual C++ 2010, and want to write a program to connect to an Oracle 10g database.

      The problem is I cannot find a version of OCCI for 10g.

      This is the only page I've found offering downloads ( http://www.oracle.com/technetwork/database/features/oci/index-090820.html ), but the only files offered target and

      Am I looking in the wrong place? Can I use these files? All of my searches for a specific 10g version are coming up empty.

      Any guidance would be greatly appreciated. Thank you.
        • 1. Re: OCCI For 10g
          You will find OCCI 10g as part of 10g client installation. But that does not work with VS2010. You need to download the OCCI libraries that are compatible with VS2010 and use them with client software.

          You can use that above ( client) to connect to a 10.2 database.
          • 2. Re: OCCI For 10g
            I have installed vc2008 express edi and oracle 10g express edition.I have written this code :

            #include <iostream>
            #include <occi>

            using oracle :: occi;
            using namespace std;

            int main(){

            oracle::occi::Environment* environment;
            oracle::occi::Connection *con;
            oracle::occi::Statement* stmt;
            oracle::occi::ResultSet* res;


            environment = oracle::occi::Environment::createEnvironment(oracle::occi::Environment::DEFAULT);
            con = environment->createConnection("gldbuser", "gldbuser", "MYDATABSE");

            stmt = con->createStatement("select * from example");
            res = stmt->executeQuery();

            while (res->next())
            std::cout<<res->getInt(1)<<" "<<res->getString(2)<<std::endl;


            }catch(oracle::occi::SQLException &e){

            return 0;

            It giving me error

            \connectivity.cpp(20) : error C2872: 'Environment' : ambiguous symbol
            1> could be 'C:\Program Files\Microsoft Visual Studio 9.0\VC\include\occiControl.h(732) : oracle::occi::Environment'
            1> or 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll : System::Environment'

            Please give me solution for that
            • 3. Re: OCCI For 10g
              Did you check if OCCI dlls in 10g XE are built using VS2008. If not you have to use the same version of VS used in building the OCCI dlls.
              You can do dumpbin to know the dependency and the version from it.