Hi everyone,
I try to read data from db file and print them, but I can not. I get error:
This is my code:
And this is my project (attached).
How to fix all. Thanks.
I try to read data from db file and print them, but I can not. I get error:
Error::
android.database.sqlite.SQLiteException: no such table: Cungcap (code 1 SQLITE_ERROR): , while compiling: SELECT FirstName FROM Cungcap
B4A:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim SQL1 As SQL
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
If FirstTime Then
SQL1.Initialize(File.DirInternal, "Data.db", True)
End If
Dim Cursor1 As Cursor
Cursor1 = SQL1.ExecQuery("SELECT FirstName FROM Cungcap")
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
Log("************************")
Log(Cursor1.GetString("FirstName"))
Next
Cursor1.Close
End Sub
How to fix all. Thanks.