what I search is in data/data/myapp/rhodata which is not accessible, am I wright?
Alternatively, is there a way to tell to the application to move the database where I will find all my data from my different models?
Or, from the application, how to copy the database to /mnt/sdcard/ for example?
1 of 1 people found this helpful
You can use the export/import functions of Rhom to have a copy of the database available to transmit to a PC:
Just keep in mind two things:
- If you're using Property bags, your data are not saved in as a separate table in SQLite, but the data are inserted in the object_values table.
- by default, the available partition you can use to export the data are "local" and "user":
archive_file_local = Rhom::Rhom.database_export("local")
archive_file_user = Rhom::Rhom.database_export("user")
So, if you want to use on the PC this data directly from the SQLite file, my suggestion is to use a Fixed Schema. But I hope this is only for testing or during development. Using a webservice interface is much more easier to put in place and maintain (but then you're redoing some of the functionality that RhoConnect already implements).
Please check this question as answered if this is the case.
Thank you Pietro,
ATM we don't want to use RhoConnect,
I implemented my solution with web services, I am pretty happy with it, however, object creation takes too much time on my mobile (ET1). I wanted to test the import and export to avoid this [to give the mobile database already full]. However, I have a problem, here is my code for export the database:
def httppost_callback begin WebView.execute_js("stHappened('START'); ") archive_file_local = Rhom::Rhom.database_export("local") WebView.execute_js("stHappened('EXPORT (" + archive_file_local + ")'); ") WebView.execute_js("stHappened('END'); ") rescue Exception => e WebView.execute_js("stHappened('Erreur (" + e + ")'); ") end sleep(2) WebView.navigate('/app') end
I got "START" and nothing else, no exception. At this level it's to understand what happens...
Second question: can you tell me why I got an error when my web service returns > 725 objects. Everything is fine when it returns <= 725 objects.
I halved the time of "objects creation" using a FixedSchema. The page "index" for these objects is really slow to appear...