Free Oracle Database Driver for Qt3

This page describes my free Qt driver for the Oracle database. While Trolltech provides an Oracle driver for the Qt Enterprise Editions, it does not provide a driver for the no-cost editions of Qt. I'm trying to rectify that "oversight" by contributing my own driver. This driver was written by using the Qt PostgreSQL driver as a starting point. I removed all of the libpq code, leaving only the Qt database API skeleton, then started fleshing out the driver functions with OCI8 code I wrote myself. The result is a driver that mostly works, but that has a few outstanding bugs I need to squash. This is my first attempt at writing a Qt-compatible driver, so keep that in mind when using the driver or when complaining to me about how badly it sucks (in your opinion).

With that said, I must point out that even though the driver generally works, it is not yet production quality. It leaks database cursors extensively while running within Designer, and will eventually cause Oracle to produce a message saying that all available cursors have been used. I'm not sure why this happens just yet, but I will fix it ASAP. This is but one of many software projects that are time-slicing my life, so be patient. On the other hand, getting this working is necessary for me to do my paid work effectively, so it's a pretty high priority.

The driver itself is hosted on Source Forge, while this web site is hosted on my own web server to ease maintenance. I haven't provided distribution packages simply because I don't know how to make them, and I haven't taken the time to learn. It's on my to-do list, but it's an extremely low priority. If you want to make packages for your favorite distribution, feel free. The driver is licensed under the GNU GPL; version 2 and above for the Qt 3 version, and version 3 and above for the upcoming Qt 4 version of the driver.

Qt 3 and Qt 4 use slightly different APIs for their database drivers, and I started this driver before I started using Qt 4, so it currently only works for Qt 3. Once I get the driver completed and (relatively) bug-free for Qt 3, I will port it to Qt 4 (which is where I need it for my work). You must already have Oracle's OCI8 libraries, as I cannot legally distribute them with the Qt driver. While the driver may compile under Windows, especially if you're using MinGW, my primary focus is Linux.

You may have noticed the spartan appearance of this site. Since I don't want to spend a lot of my time in useless presentation (I have way too much real work to do), I'm keeping this as minimalistic as possible while still conveying necessary information.


2008-02-07,

I haven't been able to find any reason for the driver to leak cursors within Designer, as my testing with my own code didn't leak any cursors. I'm going to chalk this up to a bug in how Designer handles its database plugins. I released a slightly updated version of the driver which explicitly deallocates statements (and therefore cursors) when the result set goes out of scope, even though Designer still causes the Oracle server to report a cursor exhaustion. I've marked the driver as being in transition between an alpha and beta stage, so try it out and report your results back to the SourceForge forums.

I'm going to begin porting the driver to Qt 4. Hopefully this will go a lot faster than the original Qt 3 implementation.


2013-01-16,

So here we are, nearly five years since my last posting. So what's going on with the oracleqt project? In a nutshell, the project is obsolete. Qt 4's thorough incompatibilities with Qt 3, and the resultant need to completely rewrite my entire Qt codebase (don't even get me started on the so-called compatibility libraries; they sucked really bad) convinced me to switch back to Java several years ago. As an added bonus, Java has proper Oracle support through JDBC. Better yet, I'm no longer using Oracle for anything important. I get to use PostgreSQL for all my important work nowadays (yay!)

More than that, Java's desktop performance since Project Mustang had improved so dramatically shortly after I switched from Qt 3 to Qt 4, and Netbeans came into its own as an IDE, that I would have switched anyway just for the amazing productivity gains brought about by finally having a good IDE (something Qt always lacked, and still does). Since I'm no longer using Qt, I'm no longer developing anything Qt related (including oracleqt).

But all that aside, Nokia started providing its Oracle driver with the Free editions of Qt after they released it under the LGPL. That made oracleqt obsolete, anyway. I'm going to keep this web page here for historic reasons, but you should now be using the Oracle driver bundled with the Free editions of Qt.