QSqlDriver does not support Transactions (but everything seems to be installed)
-
Most likely is due to a restriction in the Qt code that manages the driver. what driver are you using? what are you passing to
QSqlDatabase::addDatabase
?Thanks for the fast reply, this is my connection code:
m_dbConnection = QSqlDatabase::addDatabase("QMYSQL"); m_dbConnection.setHostName(host); m_dbConnection.setPort(port); if (!m_dbConnection.open(user, password)) { coutFRed("::connect, %s", qPrintable(m_dbConnection.lastError().text())); return false; } coutFGreen("::connect, connection active...");
-
Hi and welcome to devnet,
What version of MySQL is your server ?
-
Same to you !
Did you rebuild the Qt MySQL plugin ?
-
Not necessarily. The transaction detection is effective if the client library version used to build the plugin is greater than 3.23.34. Now the question is is, are you sure the server supports it ?
-
Not necessarily. The transaction detection is effective if the client library version used to build the plugin is greater than 3.23.34. Now the question is is, are you sure the server supports it ?
-
How were you using it ?
-
So basically if you don't do the check and use it, it works as expected ?
-
Sorry, I misunderstood you. So if you write the transaction in the SQL statement of the QSqlQuery it's working properly. Correct this time ?
-
Sorry, I misunderstood you. So if you write the transaction in the SQL statement of the QSqlQuery it's working properly. Correct this time ?
-
That's not the most easy but I'd re-build the MySQL plugin to see what the check does currently.