Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   DbManager.h header file not found. (http://www.go4expert.com/forums/dbmanagerh-header-file-t28708/)

vinay.1899 11Jul2012 00:49

DbManager.h header file not found.
 
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.

vinay.1899 12Jul2012 00:53

Re: DbManager.h header file not found.
 
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.

xpi0t0s 12Jul2012 19:14

Re: DbManager.h header file not found.
 
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.


All times are GMT +5.5. The time now is 10:11.