axed
13th October 2014, 13:21
Hello everbody,
i have a strange situation/behaviour with the QODBC driver.
I've deployed the application with all the release-libraries (Windows 7 x32).
When i do a simple QSqlDatabase connect with the QODBC driver, everything works well, including a QSqlQuery task.
QSqlDatabase myDb = QSqlDatabase::addDatabase("QODBC", "myDb123");
myDb.setDatabaseName("my odbc connection string");
if (!myDb.open()) {
qDebug() << myDb.lastError().text();
}
// do query and other funny things like int omg = 12/0;
But .. when i do the exact same thing a second time at runtime, i get a "DRIVER NOT LOADED. DRIVER NOT LOADED." error.
When i restart the application i get the excat behaviour again: SUCCESS; then FAIL; FAIL; FAIL...
To be honest i dont really know how to isolate the problem.
Anyone has an idea why this might occur?
i have a strange situation/behaviour with the QODBC driver.
I've deployed the application with all the release-libraries (Windows 7 x32).
When i do a simple QSqlDatabase connect with the QODBC driver, everything works well, including a QSqlQuery task.
QSqlDatabase myDb = QSqlDatabase::addDatabase("QODBC", "myDb123");
myDb.setDatabaseName("my odbc connection string");
if (!myDb.open()) {
qDebug() << myDb.lastError().text();
}
// do query and other funny things like int omg = 12/0;
But .. when i do the exact same thing a second time at runtime, i get a "DRIVER NOT LOADED. DRIVER NOT LOADED." error.
When i restart the application i get the excat behaviour again: SUCCESS; then FAIL; FAIL; FAIL...
To be honest i dont really know how to isolate the problem.
Anyone has an idea why this might occur?