ea4k / klog

KLog is a multiplatform free hamradio logger. It runs natively on Linux, macOS and Windows.
https://www.klog.xyz
GNU General Public License v3.0
76 stars 25 forks source link

CompleteWithPreviousQSO does not deliver correct data #723

Closed ea4k closed 5 months ago

ea5wa commented 5 months ago

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

ea4k commented 5 months ago

The issue is possibly here: qso::fromDB(int _qsoId)

ea5wa commented 5 months ago

I think the problem is "idQSO" is not a field of that table. The correct field name is "id".

image

ea5wa commented 5 months ago

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