Unfortunately, you don't give enough information.
Where do you call
Sub CreateDB from ?
If you call it in the
B4XMainPage module in the
B4XPage_Created routine, no problem it will also work in B4A, no need to do this in the Starter module.
But the initialization in B4J and B4A or B4i is not the same, you need this.
#If B4J
SQL1.InitializeSQLite(xui.DefaultFolder, "persons.db", True)
#Else
SQL1.Initialize(xui.DefaultFolder, "persons.db", True)
#End If
Did you have a look at the
B4X SQLite Database booklet.
There you find the B4XPages_SQLiteLight2 example.
It is not exactly what you want to do but the principle is the same.
In this example the default database is loaded from File.DirAssets instead being created in the code.
So instead of loading the database you can create it, same principle.