PDA

View Full Version : Mysql QT Store procedure OUT param HELP



Blizknight
25th December 2008, 21:27
Hi everyone
im new with qt and i wanted to run an SP from mysql

this is the code im using ..


query.prepare("call pr_gethours(?,?)");
query.bindValue(0,'2008-12-25');
query.bindValue(1,0, QSql::Out);
query.exec();
i = query.boundValue(1).toDouble();

and all i get from the boundvalue is 0, but when i test it with my query browser i get 42 ..
so i was searching over the internet and i found this guy who has the same problem... 2005 ;S

http://lists.trolltech.com/qt-interest/2005-03/thread01437-0.html

but no answer there T_T
does anybody knows how to do this ?
Thanks in advance =D

wysota
30th December 2008, 13:33
Could you check what is the type of the variant returned by boundValue()? I'd suggest using bindValue() version that uses placeholder names instead of indexes, there is a chance it will start working.