Why sqlite db address not working at all?
Hi
I'm using sqlite with Qt library
Code:
#include <QtSql/QSqlDatabase>
#include <QSqlQuery>
this is my code for connection :
Code:
mydb.open();
if (mydb.open())
{
query.exec();
int fieldNo = query.record().indexOf("theme");
while (query.next()) {
ui->cmb_themes->addItem(query.value(fieldNo).toString());
}
}
mydb.close();
Now in my system,its work right without any problem,but i copied debug folder in other computer and run, my application cant find db file!!
in other system i installed qt sdk and open myapp.pro on it,and run.. next .. db file could run and worked.why?
in my laptop with Windows7 64 bits , output address is : '.....'-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug
and in other computer with windows 7 32 bits , output address is : '.....'-build-desktop
thanks before answer
Re: Why sqlite db address not working at all?
Did you deploy the sqlite driver to the other machine?
Re: Why sqlite db address not working at all?
No.i'm using it direct(with db file address)
how can i?
if deploy sqlite,it can works?
Re: Why sqlite db address not working at all?
Re: Why sqlite db address not working at all?
oh yes.very good answer
so thanks