B4X:
Sub AddFolder(Parent As TreeTableItem, Folder As String)
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("select_chaxunzhichu", Array("chaxun"))
Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
req.HandleJobAsync(j, "req")
Wait For (req) req_Result(res As DBResult)
req.PrintTable(res)
For Each row() As Object In res.Rows
Dim val1 As String = row(res.Columns.Get("colum1"))
Dim val2 As String = row(res.Columns.Get("colum2"))
Dim val3 As int = row(res.Columns.Get("number"))
data.Add(Array(val3,val1,val2))
Dim tti As TreeTableItem
tti.Initialize("tti", Array(val1, val2, val3))
Parent.Children.Add(tti)
tti.Expanded = False
Next
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub