I'm trying to connect my QT application to the Oracle database I have installed Oracle 11g and Oracle instant client 19.9. I configured my data source in a way that I believe is correct I added my env variable to the PATH
and here's my coode function
bool db_connection::connect(){
bool test=false;
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
db.setDatabaseName("projetQT");
db.setUserName("admin");//inserer nom de l'utilisateur
db.setPassword("****");//inserer mot de passe de cet utilisateur
if (db.open())
test=true;
else
qDebug()<<db.lastError().text();
qDebug() << "Connexion FAILED.";
qDebug() << "Driver disponible: " << db.drivers();
qDebug() << "Driver fonctionnel(QODBC): " << db.isDriverAvailable("QODBC");
qDebug() << "database erreur: " << db.lastError().databaseText();
qDebug() << "driver erreur: " << db.lastError().driverText();
qDebug() << "type erreur: " << db.lastError().type();
return test;
}
And I get the error " The specified DSN contains an architecture mismatch between the Driver and Application QODBC3: Unable to connect" does anyone have a solution for me?