Hi,
I have the next code:
,(the database, it works so the problem is not here));
for(int i = 0; i < 2; ++i)
{
QVtemp = data.value(i);
QString test1
= data.
value(i
).
toString();
}
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();
}
To copy to clipboard, switch view to plain text mode
"test1" is always "". The query works fine, because data.size is 1, so I think the problem should be somewhere else... any idea?
thanks!
Bookmarks