I am adding a simple row on my database by pressing a button but when i close my app the database reverts back to its original state without had save the last row
I am testing the application it on a Android 6.0.1 Xiaomi Prime 3s Mobile Phone.
This is wierd because my database works fine.
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
If FirstTime = True Then
If File.Exists(File.DirInternal, "db.db") = False Then
File.Copy(File.DirAssets, "db.db",File.DirInternal,"db.db")
sql.Initialize(File.DirInternal, "db.db", True)
Else
sql.Initialize(File.DirInternal, "db.db", True)
End If
End If
End Sub
Sub buttonSaveContact_Click
Dim m As Map
Dim list As List
m.Initialize
list.initialise
m.Put("DESCRIPTION", "description1")
m.Put("LOCATION", "location1")
m.Put("NOTE", "notes1")
list.Add(M)
DBUtils.InsertMaps(sql, "TABLE_CONTACTS", list)
End sub
I am testing the application it on a Android 6.0.1 Xiaomi Prime 3s Mobile Phone.
This is wierd because my database works fine.
Last edited: