Doing some testing with B4XTable and run this code (altered from the posted example):
It all runs fine but below the search text box I get 1 to 2 out of 0.
Why not 1 to 2 out of 2?
How to fix this?
RBS
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim i As Int
Dim cursor1 As Cursor
Dim data As List
IME.Initialize("ime")
IME.AddHeightChangedEvent
Activity.LoadLayout("1")
'create the columns
B4XTable1.AddColumn("US County", B4XTable1.COLUMN_TYPE_NUMBERS)
B4XTable1.AddColumn("Name", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("State", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Interesting Number", B4XTable1.COLUMN_TYPE_NUMBERS)
'create an empty B4XTable
data.Initialize
B4XTable1.SetData(data)
B4XTable1.sql1.ExecNonQuery("create table test(id integer, name text, surname text, id2 integer)")
B4XTable1.sql1.ExecNonQuery("insert into test values(2, 'c', 'd', 0.234)")
B4XTable1.sql1.ExecNonQuery("insert into data values(1, 'a', 'b', 0.123)")
B4XTable1.sql1.ExecNonQuery("insert into data select * from test")
B4XTable1.sql1.ExecNonQuery("update data set c1 = 'abc' where rowid = 1")
B4XTable1.CreateDataView("1")
cursor1 = B4XTable1.sql1.ExecQuery("select sql from sqlite_master")
'CREATE TABLE data (c0 INTEGER,c1 TEXT,c2 TEXT,c3 INTEGER)
'---------------------------------------------------------
For i = 0 To cursor1.RowCount - 1
cursor1.Position = i
Log(cursor1.GetString2(0))
Next
B4XTable1.Refresh
End Sub
It all runs fine but below the search text box I get 1 to 2 out of 0.
Why not 1 to 2 out of 2?
How to fix this?
RBS