...
Dim Table As List
Table = ExecuteMemoryTable(SQL1,"SELECT * FROM table1 WHERE name = "Mayer" ORDER BY UPPER(name)", Null, 0)
'
Dim Cols() As String
Cols = Table.Get(0) '1.zutreffender Datensatz
'
lbl01.Text=Cols(0)
lbl02.Text=Cols(1)
...
'Executes the query and returns the result as a list of arrays.
'Each item in the list is a strings array.
'StringArgs - Values to replace question marks in the query. Pass Null if not needed.
'Limit - Limits the results. Pass 0 for all results.
Sub ExecuteMemoryTable(SQL As SQL, Query As String, StringArgs() As String, Limit As Int) As List
Dim cu As Cursor
If StringArgs <> Null Then
cu = SQL.ExecQuery2(Query, StringArgs)
Else
cu = SQL.ExecQuery(Query)
End If
Log("ExecuteMemoryTable: " & Query)
Dim Table As List
Table.Initialize
If Limit > 0 Then Limit = Min(Limit, cu.RowCount) Else Limit = cu.RowCount
For row = 0 To Limit - 1
cu.Position = row
Dim values(cu.ColumnCount) As String
For col = 0 To cu.ColumnCount - 1
values(col) = cu.GetString2(col)
Next
Table.Add(values)
Next
cu.Close
Return Table
End Sub