So in addition I do some tests.:
qDebug() << "LocalDB is Valid?:"<< db.isValid();
QSqlQuery mytest
("select * from localDBtable",db
);
while(mytest.next())
{
qDebug() << mytest.value(2).toString() << endl;
}
mymodel.setTable("localDBtable");
bool loctest = mymodel.select();
QSqlDatabase db;
db = QSqlDatabase::database("LocalDB");
qDebug() << "LocalDB is Valid?:"<< db.isValid();
QSqlQuery mytest("select * from localDBtable",db);
while(mytest.next())
{
qDebug() << mytest.value(2).toString() << endl;
}
QSqlTableModel mymodel;
mymodel.setTable("localDBtable");
bool loctest = mymodel.select();
To copy to clipboard, switch view to plain text mode
So first of all I test the db validation here I get a <true> value
The second I test, if I could trace over a select statement from the table. An I get the value in the while loop. So everything seems ok.
Last I take a QSqlTableModel and try to select() the table, but I get an <false> value.
So I am at the end of my knowledge?
Could anybody image what wrong here???
Bookmarks