Reputation: 39091
I've been checking out SQLite and watched a lot of examples and tutorials how to use it, but in every single example they have a database file which they are reading/writing to.
What I want is to connect to a server on the internet and read/write there. How do I achieve this? Just a hint is enough :)
Upvotes: 1
Views: 4831
Reputation: 64943
SQLite is an embedded database and it stores its data in a file.
Thus, you won't connect to a server but you'll open a database file using whatever API/library you use.
I believe you need to think again your solution. If you want to store data in a SQLite database from a remote client (for example, an iOS app), what you need is a HTTP/REST API which stores POST/PUT/DELETE in a SQLite database.
Anyway, I want to add that SQLite is a good friend if you want to store data in a client (i.e. an app) which may synchronize client data to a server data source. For example, you might open the whole SQLite database in iOS and every 5 accumulated changes and every 10 minutes is automatically-synchronized over the wire to a remote data source.
That data source may be a MySQL database exposed by a RESTful API.
Upvotes: 2