Hi ChrisW67!
Thanks for replying, and the errors you posted, i was exactly getting those messages in my Qt code and sometimes even if i was dealing only with one db connection, still it was showing the same problem. But, now it's solved. As you told, i was creating both the db's with the same default connection. So, now i'm creating both the db's in this way:
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC","remote");
QSqlDatabase db2 = QSqlDatabase::addDatabase("QSQLITE","local");
So, now i am specifying different connection names for different dbs and when i am executing a query, i am defining it this way:
QSqlQuery query(db); //////////so now, this query is attached with db and show gets executed without any failure.
But do you have any other way of using any number of db's without getting their respective connections erased?
Bookmarks