Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
Public SQL1 As SQL
Private NumberColumn As B4XTableColumn
Private B4XTable1 As B4XTable
'Private tblData2 As B4XTable
End Sub
'You can add more parameters here.
Public Sub Initialize As Object
Return Me
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
'load the layout to Root
Root.LoadLayout("Table1")
'create the columns
B4XTable1.AddColumn("DN/mm", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Di/mm", B4XTable1.COLUMN_TYPE_TEXT)
Private ResultSet1 As ResultSet
ResultSet1 = SQL1.ExecQuery("SELECT rowid FROM Pipe data")
Dim data As List
data.Initialize
Dim rs As ResultSet = SQL1.ExecQuery(ResultSet1)
Do While rs.NextRow
Dim row(2) As Object
row(0) = rs.GetString("DN/mm")
row(1) = rs.GetString("Di/mm")
data.Add(row)
Loop
rs.Close
B4XTable1.SetData(data)
End Sub