cursor1 = SQL1.ExecQuery("select CODE, NAME, PHONE11, LDDATE, LCDATE from BALANCE order by NAME asc")
For i = 0 To cursor1.RowCount - 1
cursor1.Position = i
Slist.add(???)
Next
cursor1.close
Then we want to add the first row to another list:
B4X:
Dim row As List
Dim cols As Int
Dim rows As Int
row.Initialize
rows = Slist.Size
Log(Slist.Get(0))
row=Slist.Get(0) 'Header row
cols = row.Size
What should the code be in the questionmarks, so that each row of the Slist list can be added as an array in the row list?
cursor1 = sql1.ExecQuery("select CODE, NAME, PHONE11, LDDATE, LCDATE from BALANCE order by NAME asc")
For i = 0 To cursor1.RowCount - 1
cursor1.Position = i
Slist.add(cursor1.GetString("colname"))
Next
cursor1 = sql1.ExecQuery("select CODE, NAME, PHONE11, LDDATE, LCDATE from BALANCE order by NAME asc")
For i = 0 To cursor1.RowCount - 1
cursor1.Position = i
Slist.add(cursor1.GetString("colname"))
Next