Hello I'm using PyQt ODBC support to access a database. If I use QSqlQuery works fine, but when I use QSqlTableModel the table is filled by the names of collums. An example here: exp_1 exp_2 exp_3 exp_4 name date time cheked name date time cheked name date time cheked name date time cheked I have tracked the odbc call and I discovered that the query that TableModel does is this: select "name", "date", "time","cheked" from "prcli" This is the selectstatemente of my QSqlTableModel. I think that the quotes are wrong. How can I change the query to get something like this?: select name, date, time,cheked from prcli self.model=QtSql.QSqlTableModel(self,cn)
self.model.setTable(tableName) self.model.setEditStrategy(QtSql.QSqlTableModel.OnManualSubmit) print self.model.selectStatement() # here I get this ->select "name", "date", "time","cheked" from "prcli" self.model.select() Ivan Coronado
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
