I am wondering how i can access an sqlite database that is sitting a remote server.I have read threads discouraging it but i need to do it if its possible.
/*
QUrlOperator xc("http://example.com");
xc.get("testdatabase.db");
*/
QSqlDatabase db = QSqlDatabase::addDatabase( "QSQLITE" );
db.setDatabaseName(xc.get("testdatabase.db"));
//idea
if( !db.open() )
{
qDebug() << db.lastError();
qFatal( "Failed to connect." );
}
See Question&Answers more detail:os