Hallo,

I do

Code:

  1. qDebug() << "ID" << id;
  2. qDebug() << query->isActive() << query->isSelect() << query->seek(id, false) << query->record();)


and I retrieve

Code:

  1. ID 75
  2. true true true QSqlRecord(29)


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

Code:

  1. query->next()


it was better to say


Code:

  1. query->seek(id)


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

Code:

  1. qDebug() << "ID" << id;
  2. qDebug() << query->isActive() << query->isSelect() << query->seek(id, false) << query->at();


returns

Code:

  1. ID 74
  2. true true true 110