iOS Question how to get ResultSet data in special row

cambol

Active Member
Licensed User
rs As ResultSet = SQL2.ExecQuery(strSQL) , how to get ResultSet data in special row

they can be use rs.position in b4a , but not in b4i
 

tufanv

Expert
Licensed User
Longtime User
yes , like cursor.position in b4A
I am not sure but this may work :

B4X:
dim rownumber as int = 0
Do While resultset1.NextRow
if rownumber = 14 then
something = resultset1.getint("buyprice")
end if
rownumber=rownumber+1
Loop
 
Upvote 0

Tamer El-Shimy

Member
Licensed User
Longtime User
I am not sure but this may work :

B4X:
dim rownumber as int = 0
Do While resultset1.NextRow
if rownumber = 14 then
something = resultset1.getint("buyprice")
end if
rownumber=rownumber+1
Loop
Really I understand this is about JDBCResultSet not ResultSet the normal has Position and RowCount properties.
 
Upvote 0

Tamer El-Shimy

Member
Licensed User
Longtime User
JDBCResultSet is normal to create your own integer row number either starting from 0 or 1 then check , Keep in mind that in your case 14 is the 15th Row not the 14th.
 
Upvote 0
Top