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." );
}
Drag and drop your SQLite file directly into the SQLite editor or click on "Database file > Open DB file" to open your SQLite database. Show and manipulate a table: You can select a table in order to display and manipulate its content (1). Click on refresh button (2) in order to update tables list.
You can use the Microsoft SQL Server Management Studio to connect your SQLite data to an SQL Server instance. Linked Server is a tool of MS SQL Server that allows to execute distributed queries to refer tables stored on non-SQL Server datbase in a single query.
SQLite can still be made to work in many remote database situations, but a client/server solution will usually work better in that scenario.
SQLite isn't a network database, so it doesn't have any network connection ability built into it.
You would need to either:
A web application is essentially a web service. If you happen to be running a web application on top of this DB, just expose certain levels of DB access to admins-only.
It's not recommended you do this because multiple threads/clients/etc. accessing a SQLite DB simultaneously may lead to concurrency problems very quickly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With