0

i need hints for SQLite; I receive in SOAP or REST format a large XML (betwen 200 and 5000 entries depending on the user, with around 30 columns) that i parse to a local SQLite db. This operation takes too much time for the users (from 10 seconds up to 2 minutes), so i wanted to know :

Is it possible under a window server (Delphi XE2 home made server) to create the SQLite database file and send the whole file to the mobile; Then on mobile side, replace the database file with the new one (data are not modified on client side, i can replace file with no regrets ^^ ) ?

On a rooted mobile, i just can't find the SQLite database file (searched for it with esFileExplorer, /data, /dbdata, /sdcard/data... nowhere) so i just don't know where i will have to put that file in the end...

Darkendorf
  • 463
  • 11
  • 28
  • Try searching in /data/data/"Your App name"/databases – Mohamed_AbdAllah Oct 16 '12 at 09:29
  • Given that you can change the returned data of the web service, why not use JSON? Much faster than XML. Are you also doing a bulk update to SQLite or row by row? – Simon Oct 16 '12 at 09:39
  • @Mohamed_AbdAllah , i went through everything under /data to be sure... – Darkendorf Oct 16 '12 at 12:23
  • @Simon , I do use JSON with REST, but as you point it out I update it row by row. actually i just have it in a memory object, i'm trying to find the best way to save it in SQLite. – Darkendorf Oct 16 '12 at 12:23

1 Answers1

1

Yes, its possible.

You can download the database having latest data & replace it with current database. Find an example here of "How to use existing data base", link for sample project is also there.

EDIT:

You need to modify it according to your needs.

You can delete your existing database by using context.deleteDatabase(DATABASE_NAME);

Community
  • 1
  • 1
Yaqub Ahmad
  • 27,569
  • 23
  • 102
  • 149