Hi there,
just starting to use Qt for database connectivity. As a test I've got two database files in the root of c:
test.mdb and test.accdb.
Using:
db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};FIL={Access};DBQ=c:/test.mdb");
db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};FIL={Access};DBQ=c:/test.mdb");
To copy to clipboard, switch view to plain text mode
loads up test.mdb without issue. I assumed to open the accdb version all I'd have to do was change the connection string to:
db.setDatabaseName("DRIVER={Microsoft Access Driver (*.accdb)};FIL={MS Access};DBQ=c:/test.accdb");
db.setDatabaseName("DRIVER={Microsoft Access Driver (*.accdb)};FIL={MS Access};DBQ=c:/test.accdb");
To copy to clipboard, switch view to plain text mode
Unfortunately this results in:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified QODBC3: Unable to connect.
qDebug() << QSqlDatabase::drivers();
To copy to clipboard, switch view to plain text mode
returns:
("QSQLITE", "QODBC3", "QODBC")
I'm running a stock Windows 7 install with the test.accdb file a single table simple database created with Microsoft Access 2010. Any ideas?
Bookmarks