PDA

View Full Version : Error connecting to Oracle database



NAYZAKAY44
8th September 2010, 21:55
HI everybody,
I use Microsoft windows Vista 32 bit, I installed Qt SDK 2010.04 4.7.0 (32 bit) Open source, I installed oracle 10g express.

I did an application that needs a database connection. So I had to compile the OCI driver to connect to the database.
So I did like this:
I open the Qt command Prompt.
And I typed:


set INCLUDE=%INCLUDE%;C:\oraclexe\app\oracle\product\1 0.2.0\server\OCI\includ
set LIB=%LIB%;C:\oraclexe\app\oracle\product\10.2.0\se rver\OCI\lib\MSVC
set PATH=%PATH%;C:\oraclexe\app\oracle\product\10.2.0\ server\BIN
set PATH=%PATH%;C:\Qt\2010.04\bin
set PATH=%PATH%;C:\Qt\2010.04\mingw\bin
set PATH=%PATH%;C:\Qt\2010.04\qt\qmake
set PATH=%PATH%;C:\Qt\2010.04\qt\bin
set ORACLE_HOME=C:\oraclexe\app\oracle\product\10.2.0\ server
set QT_PLUGIN_PATH=C:/Qt/plugins/sqldrivers
cd C:\Qt\2010.04\qt\src\plugins\sqldrivers\oci
qmake -o Makefile oci.pro
mingw32-make

I don't know if my compilation is correct or not...!! :confused:
But when I execute my program, it appears this message to me:

QSqlDatabase: QOCI driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC
I don’t know why the OCI driver is not loaded!! :confused:
Help plzzz
Thanks

gbaguma
2nd August 2013, 19:20
Hey,
After compiling the driver you get both release and debug versions,...that is if you compiled them both. Now you need to copy these four files files(including the .lib) file to the folder plugins/sqldrivers ...in the Qt directory. Then the QT framework will not complain anymore. Infact in that folder you have other compiled drivers as well.

Good luck