I begin in B4XPages. I start B4XPages project with B4J.
I create a database (sqlite) in (B4J)
When I go to B4A, I want to use same database without create it again. I don't need to share data between active app. Only database when I create app.
For this in B4J I create db like this
This code work in B4J but in B4A, I need to create it Starter.
Is it a better way to do with workless?
I create a database (sqlite) in (B4J)
When I go to B4A, I want to use same database without create it again. I don't need to share data between active app. Only database when I create app.
For this in B4J I create db like this
B4X:
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Dim DBsql As SQL
End Sub
Sub CreateDB
DBsql.InitializeSQLite(File.DirAssets, "tradebook.db", True)
DBsql.ExecNonQuery("CREATE TABLE IF NOT EXISTS demo (id INTEGER,nom TEXT)")
DBsql.ExecNonQuery("insert into demo (id, nom) values (3, 'test moi')")
End Sub
This code work in B4J but in B4A, I need to create it Starter.
Is it a better way to do with workless?