Quote Originally Posted by ^NyAw^ View Post
This DB has two tables that I want to query some information.
My question is: Have I to make two connections using two "QSqlDatabase" opening the same DB but different table?
You don't need the second connection, unless you want to have concurrent transactions.

Quote Originally Posted by ^NyAw^ View Post
Second question is: I have created a ODBC driver (I'm using Windows), when opening the ODBC driver,where have I to tell it the name of the driver?
In the setDatabaseName():
Qt Code:
  1. db = QSqlDatabase::addDatabase("QODBC");
  2. db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=myaccessfile.mdb");
To copy to clipboard, switch view to plain text mode