Shane
Shane

Reputation: 51

How to transfer SQLite db to web server on android phone

I have an application that creates an SQLite database and saves information to it over the course of a day. At the end of the day i want to export this database to a web server.

Could anyone point me in the right direction for this?

Should I use httppost or put. I have researched this myself online but there seems to be so many different ways to explore. The server side does not exist yet either. I have access to an apache server so i am hoping to use that.

Could anyone advise me the best/most simple way to do this?

Upvotes: 3

Views: 3989

Answers (3)

Shane
Shane

Reputation: 51

Thanks guys, Just wanted to let you know that i used the intent provided by the andFTP app in the end. Its very simple to use and details can be found at: http://www.lysesoft.com/support/forums/viewtopic.php?f=5&t=158

Upvotes: 2

Dave Everitt
Dave Everitt

Reputation: 17876

Do you want this to be an automatic or manual transfer? SQLite data is just a file, so (from the SQLite site)... "If SQLite can read the disk file then it can read anything in the database. If the disk file and its directory are writable, then SQLite can change anything in the database. Database files can easily be copied onto a USB memory stick or emailed for sharing." So (provided everything your app needs is set up on the server) just move the file to the server.

Upvotes: 0

WestDiscGolf
WestDiscGolf

Reputation: 4108

Couple of ways ...

  • you can ftp up the db each day
  • you can export the data to a csv file and post it to the server; once there you can then import it into the db on the web server

Is it for backup purposes? Or do you require a number of dbs on the web server?

Upvotes: 1

Related Questions