PDA

View Full Version : issue when using Postgresql driver QPSQL This version of PostgreSQL is not supported



fredykhan
11th February 2011, 15:49
Hello,

i am using QT 4.6.2. Previously, I used post Postgresql version 8.3.12-1. I made the QPSL driver with help from http://www.qtcentre.org/wiki/index.php?title=Building_the_QPSQL_plugin_on_Windo ws_using_MinGW
and http://trinity.pearsoncomputing.net/docs/qt4/sql-driver.html and it worked. The problem is that now i have to use Postgresql version 9.0, i used the same instructions from http://www.qtcentre.org/wiki/index.php?title=Building_the_QPSQL_plugin_on_Windo ws_using_MinGW
and http://trinity.pearsoncomputing.net/docs/qt4/sql-driver.html and the driver was build. I tested it using the cpp code

#include<QApplication>
#include<QSqlDatabase>
#include<QSqlDriver>
#include<QSqlError>
#include<QDebug>




int main(int argc, char *argv[])
{
QApplication a(argc, argv);
qDebug() << QSqlDatabase::drivers();
return a.exec();
}

But now when i use bool QSqlDatabase::open() to open the database. I am getting the warning "This version of PostgreSQL is not supported and may not work" and the database tables do not open. I would appreciate help in this regard.

Regards,
Fredy Khan

norobro
11th February 2011, 18:38
See this thread (http://www.qtcentre.org/threads/37848-QPSQL-Unable-to-find-table-set-in-a-QSqlTableModel?highlight=).

Lesiok
11th February 2011, 18:53
PostgreSQL will be supported in next release of Qt (4.7.2).