Populate fields of a row in a listbox

Hello again. I’m trying to populate a listbox with rows that have multtiple columns. The code below only shows the values of the first column. I tried concatinating the field names in the AddRow statement below but that didn’t work. I tried going into a loop but I got confused. Thanks for the help.

var rs as RowSet = db.SelectSQL("select * from meta")
if rs <> Nil and not rs.AfterLastRow then
  For each r as DatabaseRow in rs
    listMeta.AddRow rs.Column("meta_id").StringValue
  next
end if

You have to add all columns separated by comma.

var rs as RowSet = db.SelectSQL("select * from meta")
if rs <> Nil and not rs.AfterLastRow then
  For each r as DatabaseRow in rs
    listMeta.AddRow(rs.Column("meta_id").StringValue, _
      rs.Column("columnName").StringValue, _
      ...)
  next
end if
1 Like

Yes that works very well. (It’s the line continuation mark that I missed.) Thank you very much.