B4J Question resultset first row

TomDuncan

Active Member
Licensed User
Longtime User
Hi All,
Is their a way to go to the first row of a resultset.
I have some code..
B4X:
            Dim cur As ResultSet
            Try
                cur = Main.SQLite.ExecQuery("Select id,name, posts, replies, short, last_post_by FROM forumgroup")
                Do While cur.NextRow
                    txt = txt & $"<div class="w3-card-4 w3-margin-8">"$
                    txt = txt & $"    <div class="w3-row w3-card-2 w3-theme-l5 w3-padding">"$
                    txt = txt & $"        <div class="w3-col l1 m1  w3-center w3-small">"$
                    txt = txt & "             &nbsp posts: &nbsp<b>" & cur.GetString("posts") & "</b><br> replies: &nbsp<b>" & cur.GetString("replies") & "</b>"
                    txt = txt & $"        </div>"$

And I would like to re-use this resultset without reloading the data.

Can I go back to the 1st row then iterate though the set again.

Tom

or Should/Could I save it as a list of maps?
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…