Hello all, I've been dealing with a problem lately.
The program I'm dealing with has a serie of modules that are widgets displayed in a central area.
Each one of them was using the default connection to a database (whose tables are all innodb-engined).
All the data requests were in the same main GUI thread. However, as theres a QSqlQuery that makes a "connected" test, another one who checks the insertions from a remote pay provider, and others that check if the database has gotten any new index in notifications table, I decided to ease out erroring I would use a new connection for stock/invoice updating/adding, so I could rollback() the entire operation.
This proved to be harder than expected, since at some places at some times transaction() worked, and some others it would return error, and lastError()(be it driverText, databaseText or anything) would be empty, even though querying the qsqlquery would say its connection is open, so the qsqldatabase.
To remove the problem from the board, after asking to the brim of oblivion this in gemini and chatgpt, they both suggested this might be a driver issue, to which I ended up ::exec("START TRANSACTION") and ::exec("ROLLBACK") and ::exec("COMMIT") manually, however this is working, is not what is intended, so I wanted to ask you guys where the problem might be lying.
The executable is distributed with both libmysql from the installation and libssl/libcrypto, and otherwise work, but that is irking me.
Kind Regards


Reply With Quote


Bookmarks