qsqlite QSqlError(-1, "Driver not loaded", "Driver not loaded")
Hello Everyone,
I have looked at a few threads on the forums about this topic but could not find one that deals with windows 7 or a windows platform in general.
I have a bit of code here...
Code:
currentDB->addDatabase("QSQLITE");
currentDB->setHostName("broker");
currentDB->setDatabaseName(temp);
currentDB->setUserName("MTG");
currentDB->setPassword("MTG");
if(currentDB->open())
{
qDebug() << "DB opened successfully";
}
else
{
qDebug() << "DB not opened successfully" << currentDB->lastError();
}
Whenever my program gets to this section it complains because...
QSqlError(-1, "Driver not loaded", "Driver not loaded")
I have seen lots of stuff on the internet about this problem, but i am having a really hard time finding a fix for windows. I am trying to use sqlite here.
I am also having the same problem on my linux machine, but i am trying out some of the other threads' suggestions for solving that.
Can someone please help me asap with this problem for windows 7.
Thanks in advance!
Re: qsqlite QSqlError(-1, "Driver not loaded", "Driver not loaded")
I actually solved the issue.
Instead i did this...
Code:
currentDB.setHostName("MTG");
currentDB.setDatabaseName(temp);
currentDB.setUserName("MTG");
currentDB.setPassword("MTG");
if(currentDB.open())
{
qDebug() << "DB opened successfully";
}
else
{
qDebug() << "DB not opened successfully" << currentDB.lastError();
}
Worked great.