Sub GetRecord(hoy As String)
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("selectTurnos",Array(hoy))
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)
'work with result
'req.PrintTable(res)
' Log(res.Columns)
CLVTurnos.Clear
Dim Encabezado As String
Dim Cuerpo As String
For Each row() As Object In res.Rows
Encabezado= ""
Cuerpo=""
DateTime.TimeFormat = "HH:mm"
DateTime.DateFormat = "EEEE, dd"
' FechaDD=DateTime.Date (row(1))
' HoraDD = DateTime.Time (row(3))
' FechaHH=DateTime.Date (row(2))
' HoraHH= DateTime.Time (row(4))
' Encabezado = row(5) & " - "& FechaDD& " - " & HoraDD& "Hs "
' Cuerpo ="Organizado por : "& row(6) & CRLF & "Finaliza el: " & FechaHH & " a las " & HoraHH &CRLF& "Participantes involucrados :" &CRLF& row(7) & CRLF & row(8) & CRLF & row(9) & CRLF & "Cancha: " & row(10)
FechaDD=DateTime.Date (DateTime.Now)
HoraDD = DateTime.Time (DateTime.Now)
FechaHH=DateTime.Date (DateTime.Now)
HoraHH= DateTime.Time (DateTime.Now)
Encabezado = "Turno - "& FechaDD& " - " & HoraDD& "Hs "
Cuerpo ="Organizado por : Juan de los Palotes" & CRLF & "Finaliza el: " & FechaHH & " a las " & HoraHH &CRLF& "Participantes involucrados :" &CRLF& "El Capitan Piluso" & CRLF & "Su Amigo Coquito" & CRLF & "Y el otro no me acuerdo" & CRLF & "Cancha: 1"
Dim p As B4XView = CreateItem( Encabezado , Rnd(100dip, 300dip) + 60dip, Cuerpo)
CLVTurnos.Add(p, expandable.CreateValue(p, "some value"))
Next
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub