[Qt-interest] mqsql query terminating at 100th result

Ross Driedger ross at earz.ca
Tue Feb 2 18:58:21 CET 2010


On 2-Feb-10, at 12:29 PM, qt-interest-request at trolltech.com wrote:

>
> Message: 1
> Date: Tue, 02 Feb 2010 16:21:49 +0000
> From: Robert Wood <robert.wood at apostrophe.co.uk>
> Subject: Re: [Qt-interest] mqsql query terminating at 100th result
> To: qt-interest at trolltech.com
> Message-ID: <4B68511D.7020802 at apostrophe.co.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> It seems to be something purely to do with my primary key.
>
> I've tried this QSqlQueryModel after hours of digging:
>
> QSqlQueryModel model;
> 	model.setQuery("SELECT * FROM " + ui->tablesComboBox->currentText());

Hi Robert,

I have been following this thread with interest as I have bashed my  
head against a brick wall on a few Qt db issues myself (ouch!).  I've  
not come across your issue before, but that doesn't mean I can afford  
to ignore it.

One suggestion I would give that comes straight from a number of SQL  
Gurus is that 'SELECT * ...' is evil as a SQL construct; one should be  
specific about the fields that are returned.  The reasons are many.

I know that it might not help you in your present problem, but it  
might be worth a try.

Ross Driedger
ross_at_earz.ca



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100202/ddc187ec/attachment.html 


More information about the Qt-interest-old mailing list