Greetings.
I am stuck and cannot jump over a probably obvious stumbling block.
I am able to ExecuteMemoryTable successfully, but how do I read the list it returns? Code for ExecuteMemoryTable below. Of course, what I get in the log is : [Ljava.lang.String;@4568f288...
I know I am going to say I should have known that when I get an answer, but as of now, I cannot figure out how to do it. The great thing about this forum is that there is no such thing as an obvious question, and you do not get answers like - didn't you see it?
Thank you for any help on this matter.
I am stuck and cannot jump over a probably obvious stumbling block.
I am able to ExecuteMemoryTable successfully, but how do I read the list it returns? Code for ExecuteMemoryTable below. Of course, what I get in the log is : [Ljava.lang.String;@4568f288...
I know I am going to say I should have known that when I get an answer, but as of now, I cannot figure out how to do it. The great thing about this forum is that there is no such thing as an obvious question, and you do not get answers like - didn't you see it?
Thank you for any help on this matter.
B4X:
Sub ExecuteMemoryTable(SQL As SQL, Query As String, StringArgs() As String, Limit As Int) As List
Dim cur As Cursor
If StringArgs <> Null Then
cur = SQL.ExecQuery2(Query, StringArgs)
Else
cur = SQL.ExecQuery(Query)
End If
Log("ExecuteMemoryTable: " & Query)
Dim Table As List
Table.Initialize
If Limit > 0 Then Limit = Min(Limit, cur.RowCount) Else Limit = cur.RowCount
For row = 0 To Limit - 1
cur.Position = row
Dim values(cur.ColumnCount) As String
For col = 0 To cur.ColumnCount - 1
values(col) = cur.GetString2(col)
Log("cur.GetString2(col) " & cur.GetString2(col))
Next
Table.Add(values)
Next
cur.Close
Return Table
End Sub