I am trying to directly import an SQL file from a SQLite database into Basic4Android. I exported a .sql file and then I loaded the SQL file into the Basic4Android assets in the IDE.
Then I put this in my Process_Globals
Dim access As SQL
access.Initialize(File.DirAssets,"example.sql",True)
However the application crashes immediately on load when I try to run this code.
There's two things that I think could be wrong:
You do not need to export anything. Just copy the SQLite file to your project.
As you wrote it is not possible to open a database that is located in the assets folder. You should first copy it to a writable location. DBUtils can help you with this task.