[Qt-interest] qsqlquery anyone with any experience at all?

Roland Tollenaar rwatollenaar at gmail.com
Wed Sep 1 09:28:09 CEST 2010


> What does your odbc connection string look like


QSettings settings(QCoreApplication::applicationDirPath() + "/mast.ini", 
QSettings::IniFormat);
	QString MSTdbType=settings.value("MSTDB/Type", "no Driver").toString();
	QString MSTdbHost=settings.value("MSTDB/Host", "No Host").toString();
	QString MSTdbDatabaseName=settings.value("MSTDB/DatabaseName", "No 
Name").toString();
	QString UserName=settings.value("MSTDB/UserName", "No Name").toString();
	QString Password=settings.value("MSTDB/Password", "No Name").toString();

	
	//Initiate database connection
	QSqlDatabase db = QSqlDatabase::addDatabase(MSTdbType,"MASTDatabase");
     db.setHostName(MSTdbHost);
     db.setDatabaseName(MSTdbDatabaseName);
	db.setUserName(UserName);
	db.setPassword(Password);
     bool ok = db.open();
	if (!ok){
	....

>
> Scott
>
> -----Original Message-----
> From: Roland Tollenaar [mailto:rwatollenaar at gmail.com]
> Sent: Wednesday, September 01, 2010 12:17 AM
> To: Scott Aron Bloom
> Cc: Qt-interest
> Subject: Re: [Qt-interest] qsqlquery anyone with any experience at all?
>
>> First, does your SQL backend, have a "preferred client" how quickly
> does
>> it send back large record sets...
>
> Using mssql's administration tool returns and displays the same record
> set in<  0.3 seconds.
>
> Regards,
>
> Roland
>
>>
>> What data is being sent back?? Large BLOBs get read into QByteArrays,
>> meaning they take up ram... is it possible your just dealing with a
> ton
>> of data..
>>
>> For me, I tend to find the majority of the delay in the exec, not in
> the
>> query.next()...
>>
>> Scott
>>
>> -----Original Message-----
>> From: qt-interest-bounces at trolltech.com
>> [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Roland
> Tollenaar
>> Sent: Tuesday, August 31, 2010 11:27 PM
>> To: Qt-interest
>> Subject: [Qt-interest] qsqlquery anyone with any experience at all?
>>
>> Hi,
>>
>> I posted below but am not sure whether my posts are arriving on the
>> list.
>>
>> Is there anyone who has _any_ experience with qsqlquery at all?
>>
>> Regards,
>>
>> Roland
>>
>> Hi,
>>
>> we have found that using query.next() in combination with qodbc is
> very
>> very slow in qt 4.5.2.
>>
>> Is there a faster manner to process large recordsets or has the
>> qsqlquery (or qodbc) class been improved dramatically in 4.6 that
> anyone
>>
>> knows of?
>>
>> thanks in advance for any advice,
>>
>> Roland
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



More information about the Qt-interest-old mailing list