Android Question Question about getting values from a variable

padvou

Active Member
Licensed User
Longtime User
Hello.
If you take a look at the picture, "L" is a variable defined as list in my application.
How can I access the values seen in the picture?
For example the value of rowsInResult which is 1.
1611670909754.png

Thank you
 
I changed the L as List to L as JdbcResultSet but the question remains as to how I can read the values from the names as shown in the initial picture.
 
Upvote 0
Upvote 0
Code: Copy
Dim data As List
data.Initialize
Do While L.NextRow
  data.Add(Array(L.GetString("col 1"), L.GetInt("col 2"))
loop
Dim SecondRow() As Object = Data.Get(1)
Thank you Erel.
In the 4th line, can the strings be added in the array dynamically based on how many columns there are? In your example, there are two.
In the 6th line, it gets the column names?
 
Upvote 0
t gets the column names?
Code: Copy
Dim data As List
    data.Initialize
    data.Add(Array(l.GetColumnName(0), l.GetColumnName(1)))  'gives you the column names in the first row
    Do While l.NextRow
        data.Add(Array(l.GetString("col 1"), l.GetInt("col2")))
    Loop
    Dim o() As Object=data.Get(0)  ' column name
    Log(o(0))   'col 1 name
    Log(o(1))   'col 2 name
 
Upvote 0
To go back to my initial question:
L is a net.sourceforge.jtds.jdbc.JtdsResultSet
It has some values as shown in the picture.
1611831353626.png


How can I read "rowsInResult" using probably javaobject?

Dim b4xResultSet As JavaObject = L
Dim jResultSet As JavaObject = b4xResultSet.?????????
 
Upvote 0
Back
Top