Hello!
I try to establish two database connections, one with PostgreSQL and second with SQLite. I start with code:
QSqlDatabase mainDatabase = QSqlDatabase::addDatabase("QPSQL", "MainDatabase");
QSqlDatabase mapDatabase = QSqlDatabase::addDatabase("QSQLITE", "MapDatabase");
To copy to clipboard, switch view to plain text mode
then I setup and test connection with PostgreSQL – everything its fine so far. When I try to open SQLite databse with code:
mapDatabase.setDatabaseName("db_name");
if (!this->mapTilesDatabase.open())
{
// error handling
}
mapDatabase.setDatabaseName("db_name");
if (!this->mapTilesDatabase.open())
{
// error handling
}
To copy to clipboard, switch view to plain text mode
I recieve error: Driver not loaded.
Is it possible to use two different database divers simultaneously at all?
Bookmarks