Sub GetAllVehiclesList
VehiclesListB4XTable.AddColumn("status", VehiclesListB4XTable.COLUMN_TYPE_TEXT)
VehiclesListB4XTable.AddColumn("type", VehiclesListB4XTable.COLUMN_TYPE_TEXT)
VehiclesListB4XTable.AddColumn("color", VehiclesListB4XTable.COLUMN_TYPE_TEXT)
VehiclesListB4XTable.AddColumn("year", VehiclesListB4XTable.COLUMN_TYPE_TEXT)
VehiclesListB4XTable.AddColumn("model", VehiclesListB4XTable.COLUMN_TYPE_TEXT)
VehiclesListB4XTable.AddColumn("make", VehiclesListB4XTable.COLUMN_TYPE_TEXT)
VehiclesListB4XTable.AddColumn("plate", VehiclesListB4XTable.COLUMN_TYPE_TEXT)
VehiclesListB4XTable.AddColumn("id", VehiclesListB4XTable.COLUMN_TYPE_TEXT)
Dim Data As List
Data.Initialize
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("select_allvehicles", Null)
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)
For Each row() As Object In res.Rows
Data.Add(Array(0,1,2,3,4,5,6,7))
Data.Add(row)
Next
VehiclesListB4XTable.SetData(Data)
req.PrintTable(res)
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub