Hallo,
I do
qDebug() << "ID" << id;
qDebug() << query->isActive() << query->isSelect() << query->seek(id, false) << query->record();)
qDebug() << "ID" << id;
qDebug() << query->isActive() << query->isSelect() << query->seek(id, false) << query->record();)
To copy to clipboard, switch view to plain text mode
and I retrieve
ID 75
ID 75
true true true QSqlRecord(29)
To copy to clipboard, switch view to plain text mode
Why is that?
My aim is to retrieve a specific record at a known ID. My approach was all easy: thought instead of digging through all the query using
query->next()
query->next()
To copy to clipboard, switch view to plain text mode
it was better to say
query->seek(id)
query->seek(id)
To copy to clipboard, switch view to plain text mode
But obviously I don't understand the methode. Anybody here to help me out?
Thanks, Lars
Added after 8 minutes:
update: ok, 29 is the length of the record I try to readout.
But what about
qDebug() << "ID" << id;
qDebug() << query->isActive() << query->isSelect() << query->seek(id, false) << query->at();
qDebug() << "ID" << id;
qDebug() << query->isActive() << query->isSelect() << query->seek(id, false) << query->at();
To copy to clipboard, switch view to plain text mode
returns
ID 74
true true true 110
ID 74
true true true 110
To copy to clipboard, switch view to plain text mode
Bookmarks