I am trying to connect to SQLITE DB hosted at "http://server/apr/mysqlite.db" using sqlite3_open() but failing to achieve the connection. I can see the database file via browser explorer.
I am able to setup connection with database available at my local machine but didn't find any documentation to setup connection to http:// database.
Could anyone please help me accomplish the SQLITE connection in my XCODE
sqlite3_open() can't open a URL, it can only open a local file.
In order for sqlite3_open()
to do what you want, the following needs to be true:
It's possible that somebody has created the service in the second bullet point but, if they have, you'd need a different sqlite3 library that implements the same API but sends your requests to the server instead of reading and writing a local file.
If your use-case is compatible and there is a sqlite3 database at that URL, you could download it to a local file and then open it using the normal sqlite3 library. You would not be able to re-upload any changes you make, though.
ETA
Joakim Danielson is correct. Sqlite3 is intended to be embedded in end user applications, not as a client server database manager. It's worth reading the Appropriate Uses page where it says:
SQLite does not compete with client/server databases. SQLite competes with
fopen()