tblPhoneContacts.sql1.ExecQuery("SELECT rowid from data")
Dim o() As Object = tblPhoneContacts.BuildQuery(False) 'True to include the page LIMIT in the query.
Dim rs As ResultSet = tblPhoneContacts.sql1.ExecQuery2(o(0), o(1))
Do While rs.NextRow
XSelections.SelectedLines.Put(rs.GetLong("rowid"), "")
Loop
rs.Close
XSelections.Refresh