Re: [PyQt] How to retrieve number of fields of a query from QSqlQuery object
On Mittwoch 24 März 2010, bar tomas wrote: > Hi, > QSqlQuery's size method gives the number of rows retrieved > with a query. But is there some way to get the number of > fields (columns) of that query? > Many thanks. if self.query.isSelect(): record = self.query.record() qFields = [record.field(x) for x in range(record.count())] -- Wolfgang ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] How to retrieve number of fields of a query from QSqlQuery object
Hi, QSqlQuery's size method gives the number of rows retrieved with a query. But is there some way to get the number of fields (columns) of that query? Many thanks. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt