Hello Erel
I have a problem that is driving me crazy.
I created a database with sql lite expert and I copied the files in the Files folder
I used DBUtils to copy the file.
Dim db As SQL
As String Dim pathDb
pathDb = DBUtils.CopyDBFromAssets ("gpopsurvey.db")
The file is copied correctly (1.png)
but if I initialize the db
db.Initialize (File.DirDefaultExternal, "gpopsurvey.db", True)
the database is with 0 size and creates a .db.back file (2.png)
If I create the file directly
db.Initialize(File.DirDefaultExternal,"dbTest.db",True)
db.ExecNonQuery("CREATE TABLE giorni(ID INTEGER PRIMARY KEY,giorno DATE, inizio TIME,fine TIME,tot TEXT,note TEXT,costo DECIMAL)")
db.ExecNonQuery("CREATE TABLE setting(ID INTEGER PRIMARY KEY,formatdata text, formatvaluta text,costxhour int)")
everything is created correctly (3.png).
How can I solve this problem ?
I use B4A 5.8 and 1.3 sql library
I have a problem that is driving me crazy.
I created a database with sql lite expert and I copied the files in the Files folder
I used DBUtils to copy the file.
Dim db As SQL
As String Dim pathDb
pathDb = DBUtils.CopyDBFromAssets ("gpopsurvey.db")
The file is copied correctly (1.png)
but if I initialize the db
db.Initialize (File.DirDefaultExternal, "gpopsurvey.db", True)
the database is with 0 size and creates a .db.back file (2.png)
If I create the file directly
db.Initialize(File.DirDefaultExternal,"dbTest.db",True)
db.ExecNonQuery("CREATE TABLE giorni(ID INTEGER PRIMARY KEY,giorno DATE, inizio TIME,fine TIME,tot TEXT,note TEXT,costo DECIMAL)")
db.ExecNonQuery("CREATE TABLE setting(ID INTEGER PRIMARY KEY,formatdata text, formatvaluta text,costxhour int)")
everything is created correctly (3.png).
How can I solve this problem ?
I use B4A 5.8 and 1.3 sql library
Attachments
Last edited: