problem ODBC driver Microsoft Access
-
wrote on 24 Feb 2019, 16:32 last edited by
Good after noon,
I have check My ODCBdriver in the windows it are present,
this is my simple code for test
db = QSqlDatabase::addDatabase("QODBC3"); db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=D:\\GoogleDrive\\Database2.mdb"); if(!db.open()) qDebug() <<db.lastError();
but not work:
QSqlError("0", "QODBC3: Unable to connect", "[Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato.")
I tried all of them, I removed all the drivers, but I can not figure out where the error occurred
My configurations:
Windows 10 64 bit
Qt 5.12.1
plugins -
wrote on 24 Feb 2019, 18:35 last edited by
I exclusively use postgreSQL on Linux for my DB needs so I'm shooting in the dark, but I noticed that the MS ODBC driver is 32 bit. If you built Qt5.12 as a 64 bit framework then I'd expect that it won't connect.
-
wrote on 24 Feb 2019, 19:37 last edited by
Try CData Access Source instead. Also make sure to use the correct driver name. Your connection string is using the Driver field, not the Name field. Look for online examples!
-
I exclusively use postgreSQL on Linux for my DB needs so I'm shooting in the dark, but I noticed that the MS ODBC driver is 32 bit. If you built Qt5.12 as a 64 bit framework then I'd expect that it won't connect.
wrote on 24 Feb 2019, 21:27 last edited bythanks thanks you're right I had launched 64bit instead the database is 32bit
1/4