I need to maintain some variables in every form win b4j, i am using sqlite for that.
is there a better way to do that ?
Victor
is there a better way to do that ?
Victor
I think your problem is a great fit for SQLite. If you don't want to maintain the SQL syntax between storing and retrieving your date, you could look into KeyValueStore2 and let it handle all the details for you (underneath, it uses SQLite). Plus, your stored data is encrypted (if that is a requirement). If you do not need to store the data between program executions, you could still use SQLite, but have it create in-memory database(s) only (without writing to disk). Since the source is available for KeyValueStore2, you could modify it to use a in-memory database.i am using sqlite for that.
Can you show me how ? some exampleu can use a type or class to store the data in memory.
declare it once and use it where u need it.
If you go that far to write your own read write methods to serialize data to store and to retrieve your data and de-serialize it, why not just stick with KeyValueStore2? I do agree though that if writing is not needed, a class, declared globally, should suffice.read/write you can do with https://www.b4x.com/android/help/randomaccessfile.html#b4xserializator
because often u have a class with functionality & data and typically you will save/load this by a own Sub or the easy way as Object to File.If you go that far to write your own read write methods to serialize data to store and to retrieve your data and de-serialize it, why not just stick with KeyValueStore2? I do agree though that if writing is not needed, a class, declared globally, should suffice.
i triedCan you show me how ? some example
Victor
I will try both scenario an check for speed and complex of the solutions.If you go that far to write your own read write methods to serialize data to store and to retrieve your data and de-serialize it, why not just stick with KeyValueStore2? I do agree though that if writing is not needed, a class, declared globally, should suffice.