Database persistence fail

rafpic62

New Member
Licensed User
Longtime User
I use an sqlite database that is copied like the following example:


Sub Activity_Create(FirstTime As Boolean)
dbname = "invent.s3db"
If FirstTime Then
dbdir = DBUtils.CopyDBFromAssets(dbname)
End If
database.Initialize(dbdir, dbname, False)
End Sub

After this some data are inserted in the database tables and it works fine until the emulation is stopped.

If I compile and run all the data are lost and tracing into the CopyDBFromAssets function seems like the database file previously copied in the emulator memory was lost.

If I run a previous build then alla the data are still in the emulator memory.

Seems that the compile operation causes lost of emulator memory.
Someone can hel me?
 
Top