goofacz
8th January 2012, 22:47
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");
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
}
I recieve error: Driver not loaded.
Is it possible to use two different database divers simultaneously at all?
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");
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
}
I recieve error: Driver not loaded.
Is it possible to use two different database divers simultaneously at all?