DbManager.h header file not found.

vinay.1899's Avatar, Join Date: Jul 2012
Newbie Member
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 shabbir; 11Jul2012 at 08:35.. Reason: Code blocks
0
vinay.1899's Avatar, Join Date: Jul 2012
Newbie Member
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.
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
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.