Way 1:
Dim tblPerson As VTable
Dim bRes As Boolean
Dim i As Integer
tblPerson = mDatabase.Table("Person")
lbPerson.DeleteAllRows
bres = tblPerson.FirstRecord
For i = 1 To tblPerson.RecordCount
lbPerson.AddRow(tblPerson.Field("FirstName").GetString, tblPerson.Field("LastName").GetString)
lbPerson.RowTag(lbPerson.LastIndex) = tblPerson.ULongField("RecID").Value
bres = tblPerson.NextRecord
Next
Way 2:
Dim cur As VCursor
Dim i As Integer
cur = mDatabase.SqlSelect("SELECT * FROM Person")
lbPerson.DeleteAllRows
For i = 1 To cur.RecordCount
cur.Position = i
lbPerson.AddRow(cur.Field("FirstName").GetString, cur.Field("LastName").GetString)
'lbPerson.RowTag(lbPerson.LastIndex) = cur.ULongField("RecID").Value // doesn´t work
Next
However, how can I get RecID from VCursor? With the above method I get an exception