[PyQt] Forward only query

dusan smitran dusan.smitran at gmail.com
Tue Aug 10 09:40:59 BST 2010


1. ) I'm trying to connect to Netezza db via QSqlDatabase.
The connection is opened and i can get info from db (table names...)

2.) But when i try to make a query and display it in a QTableView is get the
following error:
     "Forward-only queries cannot be used in a data model"

3.) What is the preferred and fastest way of displaying forward only

4.) Code:

        model = QtSql.QSqlQueryModel()
        model.setQuery(self.getSql(), db=self.conn2)

        self.table = QtGui.QTableView()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100810/b611bf52/attachment.html>

More information about the PyQt mailing list