Hi, ma app works with BlueStacks, but with a real device i have a problem with this code:
it seems that the query does not return results, so it is empty and does not fill the "list" ... is it possible that I have to install sqlite on the device?
B4X:
'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.
Public Sub ExecuteMemoryTable(SQL As SQL, Query As String, StringArgs() As String, Limit As Int) As List
Dim cur As ResultSet
If StringArgs = Null Then
Dim StringArgs(0) As String
End If
cur = SQL.ExecQuery2(Query, StringArgs)
Log("ExecuteMemoryTable: " & Query)
Dim table As List
table.Initialize
Do While cur.NextRow
Dim values(cur.ColumnCount) As String
For col = 0 To cur.ColumnCount - 1
values(col) = cur.GetString2(col)
Next
table.Add(values)
If Limit > 0 And table.Size >= Limit Then Exit
Loop
cur.Close
Return table
End Sub
it seems that the query does not return results, so it is empty and does not fill the "list" ... is it possible that I have to install sqlite on the device?