1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DbManager.h header file not found.

Discussion in 'C++' started by vinay.1899, Jul 10, 2012.

  1. vinay.1899

    vinay.1899 New Member

    Joined:
    Jul 10, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi iam using visual studio 2008. I want to retrieve some data from oracle database using c++. But iam not able to compile the code given below. I dont know where iam lacking. I have already included the path in the projectsetting required to find occi.h and also included the path for dlls. I am using oracle 11g. can any body help me on this. Iam searching for the solution for a solution or guidance from past one week. I googled alt but did'nt goyt any solution. Please see the code below.
    Code:
    // Connection to DataBase.cpp : Defines the entry point for the console application.
    //
    
    #include "stdafx.h"
    
    #include"DbManager.h"
    #define WIN32COMMON
    
    #include<iostream>
    #include <occi.h>
    using namespace oracle::occi;
    using namespace std; 
    
    
    class DataBaseConnectionTest
    {    
    public:
        void test()
        {
    const string sqlstring("select * from info ");
    try
    {
        cout<<"Hello"<<'\n';
    
        DbManager *db=new DbManager(system);
        OracleServices *os=db->getoracleServices();
    
        Connection *conn=os->connection();
        Statement *st=conn->createStatement(sqlstring);
    ResultSet *rs=st->executeQuery();
        string name;
        while(rs->next())
        {
    name=rs->getString(1);
    cout<<name<<" "<<'\n';
        }
        st->closeResultSet(rs);
        conn->terminateStatement(st);
    }
    catch(SQLException& se)
    {
        cout<<"Error Occured"<<"\n";
    }
    
        }
    };
    void main()
    {
        DataBaseConnectionTest *dbc=new DataBaseConnectionTest();
        dbc->test();
    }
    
    Any help will be greatly appriciated.
     
    Last edited by a moderator: Jul 11, 2012
  2. vinay.1899

    vinay.1899 New Member

    Joined:
    Jul 10, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi any body can please help me ! how to get rid of this problem. I searched in other forums also but did'nt found anything related to this.
     
  3. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    You need the code for DbManager - that is, the library that defines the code and the header that defines the functions. This is not part of OCCI. Have a look around wherever you got the above test code.
     

Share This Page