[Qt-interest] QSql::Out Parameters using ODBC

Wm. G. Urquhart wgu at wurquhart.co.uk
Mon Feb 8 19:08:55 CET 2010


Hello All,

Are there any known issues with regard to using QSql::Out bound 
parameters? Regardless of what I try my return (OUTPUT) value is always 
zero even though the parameter is declared as OUTPUT in the procedure 
and is assigned a value as well, and everything appears in the database 
as expected including the 'correct' value for the Output parameter.

I'm using 4.6.0 on Windows Vista x64

...
if (q->prepare("{CALL InsertFuelData (?, ?, ?, ?)}"))
{
	q->addBindValue(4, QSql::In) ;
	q->addBindValue("Test Fuel Data", QSql::In) ;
	q->addBindValue(3, QSql::In) ;
	q->addBindValue(0, QSql::Out) ;
	if (q->exec())
	{
		DB.commit() ;
		qDebug() << " NIS Value : " << q->boundValue(3).toString() ;
	}
	else
	{
		DB.rollback() ;
	}
}
q->finish() ;

Any help would be appreciated. Thanks.

-- 
William







More information about the Qt-interest-old mailing list