Closed ea4k closed 5 months ago
The issue is possibly here: qso::fromDB(int _qsoId)
I think the problem is "idQSO" is not a field of that table. The correct field name is "id".
Finally it was a problem with the data inside my logbook.dat. It was filled with erroneous data.
There is no issue with KLog Code, previousQSO is correctly presenting the data. You can close this issue.
Sorry
There is an error in QSO::fromDB that gives an error message in QtCreator: QSqlQuery::value: not positioned on a valid record
bool QSO::fromDB(int _qsoId) { logEvent (Q_FUNC_INFO, "Start", Debug); QString queryString = "SELECT * FROM log WHERE id=:idQSO"; QSqlQuery query; query.prepare(queryString); query.bindValue(":idQSO", _qsoId);
variable _qsoId has the correct value (is pointing correctly to the previous QSO with that callsign) but function fromDB is returning bad data