Assigning SQLite Record ROWID to Listbox Row Tag

Attaching the SQLITE record being accessed to a listbox rowtag

I am reading a SQLite DB into a listbox and everything is working, but I am not sure how to access the built in rowid and assign it to the Listbox row tag.

I did not use a PK in this db and it is read only so the rowid will not change while the end user is viewing the data. I need a way to track each listbox row to a db record, ie the ROWID that is generated automatically by SQLITE. I seen it referenced just as ROWID, ROWID_ or OID around the forums, but when I try to access that field name I get NIL OBject Exception errors.

I have tried using ziprs.field(“ROWID”).IntegerValue as well both give the same error. Just curious if the ROW ID is not accessed by the
record set command or using some other field name other than ROWID.

This thread https://forum.xojo.com/34781-sqllite-row-id/0#p283857, said to put select rowid,* in the query instead of just select * but it locks up my app when I add rowid to the select query

I am using :“SELECT * FROM articlebase ORDER BY articlename”

using “SELECT rowid,* FROM articlebase ORDER BY articlename” - lockups up the app

My code…

...
...
Dim ziprs As recordSet


  if ziprs <> NIL then
    while not ziprs.EOF
      
      listbox1.AddRow ziprs.field("articlename").stringValue, _
       ziprs.field("category").stringValue, _
      ziprs.field("wordcount").stringValue

      listbox1.RowTag(listbox1.LastIndex) = ziprs.field("ROWID").StringValue
      ziprs.movenext
      
    Wend
    

OK it does seem you have to add rowid, to the search query or it will not query the rowid column

“SELECT rowid,* FROM”