I tried compiling this with: devc++ miscrosoft visual studio 2003 (vc++ 7) microsoft visual studio 2005 (8) microsoft visual studio 2008 (9) i dont know if im doing somthing wrong or what, but i keep getting this errors: ^ Code: d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(31) : error C2065: 'DbManager' : identificador no declarado d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(31) : error C2065: 'dbm' : identificador no declarado d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(33) : error C2065: 'OracleServices' : identificador no declarado d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(33) : error C2065: 'oras' : identificador no declarado d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(44) : error C2061: error de sintaxis : identificador 'DbManager' d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(44) : error C3861: 'dbm': no se encontró el identificador, ni siquiera con búsqueda dependiente de argumentos d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(46) : error C2227: el operando izquierdo de '->getOracleServices' debe señalar a class/struct/union el tipo es ''unknown-type'' d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(46) : error C3861: 'oras': no se encontró el identificador, ni siquiera con búsqueda dependiente de argumentos d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(46) : error C3861: 'dbm': no se encontró el identificador, ni siquiera con búsqueda dependiente de argumentos d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(50) : error C2227: el operando izquierdo de '->connection' debe señalar a class/struct/union el tipo es ''unknown-type'' d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(50) : error C3861: 'oras': no se encontró el identificador, ni siquiera con búsqueda dependiente de argumentos d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(109) : error C2541: 'delete' : no se pueden eliminar objetos que no sean punteros d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(109) : error C3861: 'dbm': no se encontró el identificador, ni siquiera con búsqueda dependiente de argumentos d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(114) : error C3861: 'dbm': no se encontró el identificador, ni siquiera con búsqueda dependiente de argumentos d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(116) : error C2227: el operando izquierdo de '->rollbackActions' debe señalar a class/struct/union el tipo es ''unknown-type'' d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(116) : error C3861: 'dbm': no se encontró el identificador, ni siquiera con búsqueda dependiente de argumentos d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(119) : error C2061: error de sintaxis : identificador 'ExoException' d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(119) : error C2310: los controladores de tipo catch deben especificar un tipo d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(121) : error C2065: 'ex1' : identificador no declarado d:\rcocchiararo\Mis documentos\Visual Studio Projects\test\test.cpp(121) : error C2228: el operando izquierdo de '.getExceptionText' debe tener el tipo class/struct/union el tipo es ''unknown-type'' is dbmanager.h or some other library responsable for defining all those variables/things ? i have tried with oracle client and oracle server 10g installed. I downloaded occi for visual studio 2005 (vs8), and well, i dont know what else to do
to bad i see no edit button, anyway, i forgot to mention that im new to visual studio, so i may be missing some configuration or chosing the wrong type of project, dunno
i see (i was kinda exited about a posible solution for my "problem" when i saw i had a mail from this forum :p )
ahhhhhhh heck the moment i finished posting the last mesage i saw i had a reply on another forum telling me this about my problem: any ideas about that either ? i find it strange that this example is all over the web and im the only one unable to compile it.
You're not the only one unable to compile it. The code is dependent on dbmanager.h and won't build without it, and dbmanager.h (and any library or other source code it relates to) is not referenced anywhere. Simply removing #include <dbmanager.h> WON'T solve the problem because there are references within the code, i.e.: Code: DbManager* dbm = NULL; dbm = new DbManager(userName); oras = dbm->getOracleServices(); Connection * conn = oras->connection(); delete dbm; dbm->rollbackActions(ex, stmt, resultSet); OP: how about providing dbmanager.h and dbmanager.cpp, or at least stating where it can be found, so that people can actually use this example?
created an employee table in sql and coded in cpp....i compiled using g++ compiler...but getting lot of errors ....can u pls help me out..
there is no clear solution to this problem..still unable to fix this prob in comp.... i need to do case study..and i need it urgently...
I'm trying to fix the code but I keep getting unexplained crashes. In the meantime use some of the OCCI demo programs from $ORACLE_HOME/rdbms/demo. In 10g these are installed from the Companion disk.
If you are not sure what is C++ and oracle then you should post your query in the new thread and not just jump into any thread saying you are new to hacking. This thread is also not about hacking BTW
Hi..Shishir ...very Nice code .....But I need C++ connectivity with DB2 can u suggest some code as well as configuration requirements for connecting C++ with DB2...... thanks in advance.............
great. It is great program. I confused to understand it. Because i am not good in programming. But it is not too much complex. thanks
Hi This code is not working on Unix Solaris . Its giving error Could not open include file<DbManager.h> what is the solution ?
Hi, Am trying to connect with this piece of code from Dev C++ 4.9.9.2. I believe that Dev C++ is using GCC compiler.... Compilation is success. But the problem is when i try to execute the code am getting "Linker" error. Any Idea about how resolve the above error.... Please advice.... With Regards, Venkat Raghaven
I even tried with the "OCI examples" but no go.... Still the same "Linker" error.... Am really Stuck with this..... Please help.... With Regards, Venkat Raghaven