jano_alex_es
27th April 2009, 14:33
Hi,
I have the next code:
QSqlQuery data(QString("SELECT sname, ssurname FROM games WHERE id =3")
,(the database, it works so the problem is not here));
QVariant QVtemp;
for(int i = 0; i < 2; ++i)
{
QVtemp = data.value(i);
QString test1= data.value(i).toString();
}
"test1" is always "". The query works fine, because data.size is 1, so I think the problem should be somewhere else... any idea?
thanks!
I have the next code:
QSqlQuery data(QString("SELECT sname, ssurname FROM games WHERE id =3")
,(the database, it works so the problem is not here));
QVariant QVtemp;
for(int i = 0; i < 2; ++i)
{
QVtemp = data.value(i);
QString test1= data.value(i).toString();
}
"test1" is always "". The query works fine, because data.size is 1, so I think the problem should be somewhere else... any idea?
thanks!