libqt4-sql does not include QODBC

Bug #179261 reported by peter V
6
Affects Status Importance Assigned to Milestone
qt4-x11 (Ubuntu)
Fix Released
Undecided
Terence Simpson

Bug Description

Binary package hint: libqt4-sql

Hello,

The libqt4-sql package does not include the QODBC driver, and it s also not available as a separate package.
Meaning that this program will compile but not run:

#include <QSqlDatabase>

int main()
{
 QSqlDatabase db = QSqlDatabase::addDatabase( "QODBC" );
 return 0;
}

Giving the error:

QSqlDatabase: QODBC driver not loaded
QSqlDatabase: available drivers: QPSQL7 QPSQL QMYSQL3 QMYSQL QSQLITE QSQLITE2

Qt4 builds on windows defeault with ODBC support, in at least Fedora and FreeBSD odbc support is made available in a seperate package:

http://download.fedora.redhat.com/pub/fedora/linux/extras/6/i386/repoview/qt4-odbc.html
http://www.freshports.org/databases/qt4-odbc-plugin

Is this also possible for Ubuntu? thanks.

Tags: patch

Related branches

Revision history for this message
Diego Schulz (dschulzg) wrote :

I think my question (link below) regarding support for Firebird SQL in libqt4-sql is related to your question. Maybe an alternate package could provide support for both drivers.

Regards,

https://answers.launchpad.net/ubuntu/+question/22305

Revision history for this message
peter V (peter-velthuis) wrote : RE: [Bug 179261] Re: libqt4-sql does not include QODBC

Hello, yes its the same problem. there are no packages Qt for DB plugins.
But to built it yoursef is not so hard..... you can look here:

http://doc.trolltech.com/4.2/sql-driver.html

Basicly what you do is download the Qt sources (SAME VERSION AS INSTALLED) , go to the driver section of code and compile plugin as explained in sql-driver.html. Then place the plugin in the installed Qt plugins directory. Then it will work...

But still i think packages for this are the better way.. and you are right, there are no debian packages either.

> From: <email address hidden>> To: <email address hidden>> Date: Wed, 16 Jan 2008 17:00:19 +0000> Subject: [Bug 179261] Re: libqt4-sql does not include QODBC> > I think my question (link below) regarding support for Firebird SQL in> libqt4-sql is related to your question. Maybe an alternate package could> provide support for both drivers.> > Regards,> > https://answers.launchpad.net/ubuntu/+question/22305> > -- > libqt4-sql does not include QODBC> https://bugs.launchpad.net/bugs/179261> You received this bug notification because you are a direct subscriber> of the bug.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Revision history for this message
Diego Schulz (dschulzg) wrote :

Thank you for your suggestion. I managed to build fully functional deb packages with firebird support enabled.
My instructions are at http://ubuntuforums.org/showthread.php?t=669005

(Please excuse my poor english. I'm doing my best, believe me :) )

Changed in qt4-x11:
assignee: nobody → tsimpson
status: New → Confirmed
Revision history for this message
Terence Simpson (tsimpson) wrote :

This should allow the ODBC plugin to be built

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4.3.3-0ubuntu3

---------------
qt4-x11 (4.3.3-0ubuntu3) hardy; urgency=low

  * Added build-dep on unixodbc-dev
  * Added kubuntu_03_use_bash_in_configure.diff to fix detection of
    available plugins for libQtSql
  * Added package libqt4-plugin-odbc for odbc support (LP: #179261)

 -- Terence Simpson <email address hidden> Thu, 07 Feb 2008 19:23:31 +0000

Changed in qt4-x11:
status: Confirmed → Fix Released
Revision history for this message
Mondin Marco (mondin-marco) wrote :

I trayed the 4.4.0-1ubuntu5~hardy1~ppa2. A little application i made to access my ISeries with ODBC driver, won't work with queries. This application worked in original QT4.2 myself compiled, but not whit this driver.
The DB is correctly opened, query.exec() is activated, but query.next() return no results.
Excuse me for my English, I'm Italian.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.